Fix for traceback when running Cronitor, Cronhub, and PagerDuty monitor hooks (#336).

This commit is contained in:
Dan Helfman 2020-06-25 20:23:25 -07:00
parent d0b9c436b1
commit 35d542a676
5 changed files with 25 additions and 1 deletions

3
NEWS
View file

@ -1,3 +1,6 @@
1.5.8.dev0
* #336: Fix for traceback when running Cronitor, Cronhub, and PagerDuty monitor hooks.
1.5.7
* #327: Fix broken pass-through of BORG_* environment variables to Borg.
* #328: Fix duplicate logging to Healthchecks and send "after_*" hooks output to Healthchecks.

View file

@ -39,3 +39,10 @@ def ping_monitor(ping_url, config_filename, state, monitoring_log_level, dry_run
if not dry_run:
logging.getLogger('urllib3').setLevel(logging.ERROR)
requests.get(ping_url)
def destroy_monitor(ping_url_or_uuid, config_filename, monitoring_log_level, dry_run): # pragma: no cover
'''
No destruction is necessary for this monitor.
'''
pass

View file

@ -38,3 +38,10 @@ def ping_monitor(ping_url, config_filename, state, monitoring_log_level, dry_run
if not dry_run:
logging.getLogger('urllib3').setLevel(logging.ERROR)
requests.get(ping_url)
def destroy_monitor(ping_url_or_uuid, config_filename, monitoring_log_level, dry_run): # pragma: no cover
'''
No destruction is necessary for this monitor.
'''
pass

View file

@ -69,3 +69,10 @@ def ping_monitor(integration_key, config_filename, state, monitoring_log_level,
logging.getLogger('urllib3').setLevel(logging.ERROR)
requests.post(EVENTS_API_URL, data=payload.encode('utf-8'))
def destroy_monitor(ping_url_or_uuid, config_filename, monitoring_log_level, dry_run): # pragma: no cover
'''
No destruction is necessary for this monitor.
'''
pass

View file

@ -1,6 +1,6 @@
from setuptools import find_packages, setup
VERSION = '1.5.7'
VERSION = '1.5.8.dev0'
setup(