Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix/utils01 #90

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ ops/
nohup.out
*.log
celerybeat-schedule
authorized_keys

14 changes: 10 additions & 4 deletions common/util/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
2 changes: 1 addition & 1 deletion restart_caly_service.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -81,5 +82,4 @@ else
nohup bash run_dailyJob.sh &> /dev/null &
fi

bash run_reco_sys.sh