diff --git a/crawlab/.gitignore b/crawlab/.gitignore index e043754d..ccc81841 100644 --- a/crawlab/.gitignore +++ b/crawlab/.gitignore @@ -110,3 +110,5 @@ node_modules/ # egg-info *.egg-info + +tmp/ diff --git a/crawlab/bin/run_worker.py b/crawlab/bin/run_worker.py index 92bf85d5..69edcbc6 100644 --- a/crawlab/bin/run_worker.py +++ b/crawlab/bin/run_worker.py @@ -13,7 +13,7 @@ import tasks.spider import tasks.deploy if __name__ == '__main__': - if sys.platform == 'windows': + if 'win' in sys.platform: celery_app.start(argv=['tasks', 'worker', '-P', 'eventlet', '-E', '-l', 'INFO']) else: celery_app.start(argv=['tasks', 'worker', '-E', '-l', 'INFO']) diff --git a/crawlab/routes/base.py b/crawlab/routes/base.py index 1578b3f8..e068e4a2 100644 --- a/crawlab/routes/base.py +++ b/crawlab/routes/base.py @@ -111,7 +111,7 @@ class BaseApi(Resource): self.after_update() - return item + return jsonify(item) def update(self, id: str = None) -> (dict, tuple): """ @@ -137,7 +137,7 @@ class BaseApi(Resource): # execute after_update hook self.after_update(id) - return item + return jsonify(item) def post(self, id: str = None, action: str = None): """