示例#1
0
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'])
示例#2
0
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"])
示例#3
0
def worker(options):
    from streamharvester.app import app

    app.config_from_object(options)
    app.start(["celery", "worker"])
示例#4
0
def worker(options):
    from streamharvester.app import app
    app.config_from_object(options)
    app.start(['celery', 'worker'])