pyramid_celery icon indicating copy to clipboard operation
pyramid_celery copied to clipboard

Example is confusing

Open lukecyca opened this issue 11 years ago • 1 comments

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. :)

lukecyca avatar Aug 02 '13 17:08 lukecyca

I should add that the Executing worker section was rather confusing for me to.

celery worker -A pyramid_celery.celery_app --ini myappsettings.ini, where celery_app is my actual app name didn't work..

celery worker -A pyramid_celery --ini myappsetting.ini worked.

Is that the expected behavior ?

heronrs avatar Jan 28 '18 15:01 heronrs