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/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): 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