mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-22 17:31:03 +01:00
15 lines
363 B
Python
15 lines
363 B
Python
import sys
|
|
from celery import Celery
|
|
|
|
from app import celery_app
|
|
|
|
# import necessary tasks
|
|
import tasks.spider
|
|
import tasks.deploy
|
|
|
|
if __name__ == '__main__':
|
|
if sys.platform == 'windows':
|
|
celery_app.start(argv=['tasks', 'worker', '-P', 'eventlet', '-E', '-l', 'INFO'])
|
|
else:
|
|
celery_app.start(argv=['tasks', 'worker', '-E', '-l', 'INFO'])
|