mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
overview pages updated
This commit is contained in:
7
bin/run_flower.py
Normal file
7
bin/run_flower.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from config.celery import BROKER_URL
|
||||
import subprocess
|
||||
|
||||
if __name__ == '__main__':
|
||||
p = subprocess.Popen(['celery', 'flower', '-b', BROKER_URL], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
for line in iter(p.stdout.readline, 'b'):
|
||||
print(line.decode('utf-8'))
|
||||
14
bin/run_worker.py
Normal file
14
bin/run_worker.py
Normal file
@@ -0,0 +1,14 @@
|
||||
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'])
|
||||
@@ -1 +1,2 @@
|
||||
celery flower --broker=mongodb://localhost:27017 --backend=redis://localhost:6379/1
|
||||
#!/usr/bin/env bash
|
||||
celery flower --broker=mongodb://localhost:27017
|
||||
|
||||
Reference in New Issue
Block a user