Exemplo n.º 1
0
def submit_tasks(options):
    from streamharvester.app import app

    app.config_from_object(options)
    for station in options["stations"]:
        for task, args in tasks_per_station(station):
            task.apply_async(args)
Exemplo n.º 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'])
Exemplo n.º 3
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"])
Exemplo n.º 4
0
def worker(options):
    from streamharvester.app import app

    app.config_from_object(options)
    app.start(["celery", "worker"])
Exemplo n.º 5
0
def worker(options):
    from streamharvester.app import app
    app.config_from_object(options)
    app.start(['celery', 'worker'])
Exemplo n.º 6
0
def submit_tasks(options):
    from streamharvester.app import app
    app.config_from_object(options)
    for station in options['stations']:
        for task, args in tasks_per_station(station):
            task.apply_async(args)