mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-28 17:50:56 +01:00
fixed deploy/run task issue
This commit is contained in:
9
app.py
9
app.py
@@ -1,8 +1,11 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from flask import Flask, logging
|
||||
from flask_cors import CORS
|
||||
from flask_restful import Api
|
||||
|
||||
from config import FLASK_HOST, FLASK_PORT
|
||||
from config import FLASK_HOST, FLASK_PORT, PROJECT_LOGS_FOLDER
|
||||
from routes.deploys import DeployApi
|
||||
from routes.files import FileApi
|
||||
from routes.nodes import NodeApi
|
||||
@@ -45,5 +48,9 @@ api.add_resource(StatsApi,
|
||||
'/api/stats',
|
||||
'/api/stats/<string:action>')
|
||||
|
||||
# create folder if it does not exist
|
||||
if os.path.exists(PROJECT_LOGS_FOLDER):
|
||||
os.makedirs(PROJECT_LOGS_FOLDER)
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host=FLASK_HOST, port=FLASK_PORT)
|
||||
|
||||
Reference in New Issue
Block a user