fixed add schedules error issue

This commit is contained in:
Marvin Zhang
2019-05-23 17:13:20 +08:00
parent 2fce5efab8
commit fe45a9cedc
3 changed files with 5 additions and 3 deletions

2
crawlab/.gitignore vendored
View File

@@ -110,3 +110,5 @@ node_modules/
# egg-info
*.egg-info
tmp/

View File

@@ -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'])

View File

@@ -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):
"""