measure execution time if healthcheck is enabled
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-09-27 18:44:56 +02:00
parent f32576c32c
commit 1ea90db3ad
2 changed files with 8 additions and 1 deletions

View File

@@ -140,7 +140,7 @@ def notify_users():
session = db.get_db() session = db.get_db()
cfg = config.load() cfg = config.load()
if cfg["healthchecks"]["url"] != "": if cfg["healthchecks"]["url"] != "":
requests.get(cfg["healthchecks"]["url"]) requests.get(cfg["healthchecks"]["url"] + '/start')
for user in session.query(model.User): for user in session.query(model.User):
logger.info("==== USER: %s =====", user.name) logger.info("==== USER: %s =====", user.name)
@@ -189,6 +189,9 @@ def notify_users():
logger.info("New API status: %s", user.apistatus) logger.info("New API status: %s", user.apistatus)
session.commit() session.commit()
if cfg["healthchecks"]["url"] != "":
requests.get(cfg["healthchecks"]["url"])
def main(): def main():
args = parse_args(sys.argv[1:]) args = parse_args(sys.argv[1:])

View File

@@ -0,0 +1,4 @@
from infomentor import model, db, icloudcalendar, config
cfg = config.load()
class Attachment(object):