mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-25 17:42:25 +01:00
added tasks
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
|
||||
from celery import Celery
|
||||
|
||||
app = Celery(__name__)
|
||||
app.config_from_object('config.celery')
|
||||
|
||||
import tasks.spider
|
||||
import tasks.deploy
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.start(argv=['tasks.spider', 'worker', '-P', 'eventlet', '-E', '-l', 'INFO'])
|
||||
if sys.platform == 'windows':
|
||||
app.start(argv=['tasks', 'worker', '-P', 'eventlet', '-E', '-l', 'INFO'])
|
||||
else:
|
||||
app.start(argv=['tasks', 'worker', '-E', '-l', 'INFO'])
|
||||
|
||||
Reference in New Issue
Block a user