healthchecks/hc/front
Pēteris Caune a463daa775
Update Webhook transport to close db connection before network IO
Webhook requests can take 20+ seconds. During that time we hold
on to a database connection. With this commit, the Webhook transport
closes its DB connection before making a curl call.

With psycopg2 this does not have much effect. But with
psycopg 3 & connection pooling we will be able to use more
sendalerts workers than we have database connections. While one
worker is busy making a slow curl call, another worker can
grab its freed up connection and do some work.

Django's test runner is not happy with connections closed
mid-test, so I patched out close_old_connections() in affected tests.
2024-08-31 19:18:17 +03:00
..
management Improve type hints in the pygmentize management command 2024-05-01 11:34:39 +03:00
migrations Login works, stubbed out canary index page 2015-06-11 23:44:49 +03:00
templatetags Improve performance of loading ping body previews 2024-07-11 17:38:25 +03:00
tests Update Webhook transport to close db connection before network IO 2024-08-31 19:18:17 +03:00
__init__.py Login works, stubbed out canary index page 2015-06-11 23:44:49 +03:00
admin.py Remove unused imports, cleanup. 2020-04-07 10:08:20 +03:00
context_processors.py Improve type hints 2023-10-26 08:35:06 +03:00
decorators.py Fix type warnings, improve type hints in hc.front.views 2023-09-06 11:18:47 +03:00
forms.py Show status changes (flips) in check's log page 2024-04-09 12:39:42 +03:00
models.py Remove unused imports, cleanup. 2020-04-07 10:08:20 +03:00
urls.py Add auto-refresh functionality to log page (#963) 2024-02-23 11:36:31 +02:00
validators.py Fix the validation of multi-line OnCalendar expressions 2023-12-06 16:50:59 +02:00
views.py Simplify and eliminate assert 2024-08-20 14:39:11 +03:00