mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
prepare for multi-node deployment
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
from config.celery import BROKER_URL
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
# make sure the working directory is in system path
|
||||
file_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
root_path = os.path.abspath(os.path.join(file_dir, '..'))
|
||||
sys.path.append(root_path)
|
||||
|
||||
from config.celery import BROKER_URL
|
||||
|
||||
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'):
|
||||
|
||||
Reference in New Issue
Block a user