From bcb4fbb5be287a67dc2a436aba589c3eff7b0837 Mon Sep 17 00:00:00 2001 From: yenoss Date: Fri, 16 Jun 2017 11:07:00 +0900 Subject: [PATCH 1/2] fix restartcaly script --- .gitignore | 1 + restart_caly_service.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 04458ab..1fa9457 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ ops/ nohup.out *.log celerybeat-schedule +authorized_keys diff --git a/restart_caly_service.sh b/restart_caly_service.sh index c95cbaa..2ac9217 100644 --- a/restart_caly_service.sh +++ b/restart_caly_service.sh @@ -1,5 +1,6 @@ #!/bin/bash argv1=$1 +bash run_reco_sys.sh # SERVER=$(ps -ef | grep '/home/yenos/caly/envCaly/bin/gunicorn -w 9 -b 0.0.0.0:55566 caly:app'| wc -l) @@ -81,5 +82,4 @@ else nohup bash run_dailyJob.sh &> /dev/null & fi -bash run_reco_sys.sh From cfc8f4c5320f8637bb3ee8296ccff02871fafa32 Mon Sep 17 00:00:00 2001 From: yenoss Date: Fri, 30 Jun 2017 00:43:01 +0900 Subject: [PATCH 2/2] hot fix utc parsing err --- common/util/utils.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common/util/utils.py b/common/util/utils.py index aa12d71..c9eac44 100644 --- a/common/util/utils.py +++ b/common/util/utils.py @@ -75,10 +75,16 @@ def fetch_all_json(result): return lis def date_utc_to_current(date): - if(date.index('+') != -1): - return date[:date.index('+')] - elif(date.index('-') != -1): - return date[:date.index('-')] + if(date.find("Z") != -1): + date = date[:-1] + return datetime.strptime(date, "%Y-%m-%dT%H:%M:%S") + else: + if(date.find("+") != -1): + if(date.index('+') != -1): + return date[:date.index('+')] + elif(date.find("-") != -1): + if(date.index('-') != -1): + return date[:date.index('-')] def checkTime(date,state):