Browse Source

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

master
Dan Helfman 1 year ago
parent
commit
35d542a676
  1. 3
      NEWS
  2. 7
      borgmatic/hooks/cronhub.py
  3. 7
      borgmatic/hooks/cronitor.py
  4. 7
      borgmatic/hooks/pagerduty.py
  5. 2
      setup.py

3
NEWS

@ -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.

7
borgmatic/hooks/cronhub.py

@ -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

7
borgmatic/hooks/cronitor.py

@ -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

7
borgmatic/hooks/pagerduty.py

@ -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

2
setup.py

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

Loading…
Cancel
Save