Skip to content

Example is confusing #25

Open
Open
@lukecyca

Description

@lukecyca

In reading the example, the term "task" is very overloaded. It refers to a model object, a property of that object, as well as celery's task concept. For example:

@task
def add_task(task):
    time.sleep(random.choice([2,4,6,8,10]))
    print 'creating task %s' % task
    task = TaskItem(task=task)
    DBSession.add(task)
    transaction.commit()

I would suggest adopting some other arbitrary model for the purposes of the example. It would make it easier for a newb such as myself to understand. :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions