app/soc/tasks/__init__.py
author Lennard de Rijk <ljvderijk@gmail.com>
Wed, 30 Sep 2009 21:26:50 +0200
changeset 2995 5931e6d6056f
parent 2594 dd300af0e7df
permissions -rw-r--r--
Changed the working of the iterative_task decorator. The decorator now needs the logic for the model which it fetches. This is much nicer then "fetching" it using import. Also order has been removed since it has no use when iterating over all entities when key is involved. Fields to filter can now dynamically be set by the function that is wrapped. Note that it will merge the filter with the task_default kwarg and it will only use the start_key if their is no key present in the context. Also note that task_default gathers all kwargs. I tried to do it otherwise (with default kwargs) but I couldn't get it to work. Feel free to improve :).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2594
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     1
#
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     2
# Copyright 2009 the Melange authors.
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     3
#
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     4
# Licensed under the Apache License, Version 2.0 (the "License");
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     5
# you may not use this file except in compliance with the License.
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     6
# You may obtain a copy of the License at
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     7
# 
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     8
#   http://www.apache.org/licenses/LICENSE-2.0
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
     9
# 
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    10
# Unless required by applicable law or agreed to in writing, software
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    11
# distributed under the License is distributed on an "AS IS" BASIS,
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    13
# See the License for the specific language governing permissions and
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    14
# limitations under the License.
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    15
dd300af0e7df Added empty Tasks package and queue.yaml.
Lennard de Rijk <ljvderijk@gmail.com>
parents:
diff changeset
    16
"""This module contains Melange Task API related modules."""