Let's say there is a task:
from pyramid_mailer import get_mailer
from celery import Celery
from celery.schedules import crontab
class Config:
CELERYBEAT_SCHEDULE = {
'every-minute': {
'task': 'send_mail',
'schedule': crontab(minute='*/1'),
* 'args': ??,*
},
}
app = Celery()
app.config_from_object(Config)
@app.task
def send_mail(*request*):
mailer = get_mailer(*request*)
#send email.....
If it is to be set up as a scheduled task, how can I deal with the required
"*request*" object?
Or should I just use *DummyRequest* to fake it? Does it still get all the
settings in .*INI* ?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss.
For more options, visit https://groups.google.com/d/optout.