mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fixed add schedules error issue
This commit is contained in:
2
crawlab/.gitignore
vendored
2
crawlab/.gitignore
vendored
@@ -110,3 +110,5 @@ node_modules/
|
||||
|
||||
# egg-info
|
||||
*.egg-info
|
||||
|
||||
tmp/
|
||||
|
||||
@@ -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'])
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user