def scheduler(options): from datetime import timedelta from streamharvester.app import app options['CELERYBEAT_SCHEDULE'] = { 'add-every-30-seconds': { 'task': 'streamharvester.tasks.add', 'schedule': timedelta(seconds=30), 'args': (16, 16) } } app.config_from_object(options) app.start(['celery', 'beat'])
def scheduler(options): from datetime import timedelta from streamharvester.app import app options["CELERYBEAT_SCHEDULE"] = { "add-every-30-seconds": { "task": "streamharvester.tasks.add", "schedule": timedelta(seconds=30), "args": (16, 16), } } app.config_from_object(options) app.start(["celery", "beat"])
def worker(options): from streamharvester.app import app app.config_from_object(options) app.start(["celery", "worker"])
def worker(options): from streamharvester.app import app app.config_from_object(options) app.start(['celery', 'worker'])