Updated healthchecks to have a run time
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
58ea766027
commit
e8ac879403
@ -1,4 +1,6 @@
|
|||||||
def healthcheck_ping(req_obj, url):
|
def healthcheck_ping(req_obj, url, start=False):
|
||||||
|
if start == True:
|
||||||
|
url + '/start'
|
||||||
try:
|
try:
|
||||||
req_obj.get(url, timeout=10)
|
req_obj.get(url, timeout=10)
|
||||||
except req_obj.RequestException as e:
|
except req_obj.RequestException as e:
|
||||||
|
@ -77,6 +77,10 @@ apprise_aurls = os.getenv("apprise_aurls")
|
|||||||
apprise_title = os.getenv("apprise_title")
|
apprise_title = os.getenv("apprise_title")
|
||||||
apprise_body = os.getenv("apprise_body")
|
apprise_body = os.getenv("apprise_body")
|
||||||
|
|
||||||
|
# healthcheck - Tell healthchecks.io we are starting the backup
|
||||||
|
if healthcheck:
|
||||||
|
healthcheck_ping(r, healthcheck_url, start=True)
|
||||||
|
|
||||||
# Stop seafile and seafile hub
|
# Stop seafile and seafile hub
|
||||||
if docker_command:
|
if docker_command:
|
||||||
os.system(f'docker exec {container_name} /opt/seafile/seafile-serverlatest/seahub.sh stop')
|
os.system(f'docker exec {container_name} /opt/seafile/seafile-serverlatest/seahub.sh stop')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user