git webhook test

This commit is contained in:
Marvin Zhang
2019-03-16 19:30:37 +08:00
parent ca80fd8337
commit 12a18cad2d
2 changed files with 1 additions and 5 deletions

View File

@@ -73,6 +73,7 @@ api.add_resource(ScheduleApi,
def monitor_nodes_status(celery_app):
def update_nodes_status(event):
node_id = event.get('hostname')
db_manager.update_one('nodes', id=node_id, values={
'status': NodeStatus.ONLINE
})

View File

@@ -5,8 +5,6 @@ PROJECT_LOGS_FOLDER = '/var/logs/crawlab'
PROJECT_TMP_FOLDER = '/tmp'
# celery variables
# BROKER_URL = 'redis://localhost:6379/0'
# CELERY_RESULT_BACKEND = 'mongodb://localhost:27017/'
BROKER_URL = 'redis://192.168.99.100:6379/0'
CELERY_RESULT_BACKEND = 'mongodb://192.168.99.100:27017/'
CELERY_MONGODB_BACKEND_SETTINGS = {
@@ -20,11 +18,8 @@ CELERY_ENABLE_UTC = True
FLOWER_API_ENDPOINT = 'http://localhost:5555/api'
# database variables
# MONGO_HOST = 'localhost'
MONGO_HOST = '192.168.99.100'
MONGO_PORT = 27017
# MONGO_USER = 'test'
# MONGO_PASS = 'test'
MONGO_DB = 'crawlab_test'
# flask variables