Compare commits

..

8 commits

3 changed files with 8 additions and 2 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased] ## [Unreleased]
## 0.7.0
Date: 2025-01-14
- ✨ — IPv4/IPv6 choice for checks, and choice for a dual-stack check (#69) - ✨ — IPv4/IPv6 choice for checks, and choice for a dual-stack check (#69)
- ⚡ — Mutualize check requests (#68) - ⚡ — Mutualize check requests (#68)
- ✨ — Ability to delay notification after X failures (#71) - ✨ — Ability to delay notification after X failures (#71)

View file

@ -1 +1 @@
VERSION = "0.6.1" VERSION = "0.7.0"

View file

@ -164,6 +164,7 @@ class ArgosAgent: # pylint: disable-msg=too-many-instance-attributes
logger.info("Received %i tasks from the server", len(data)) logger.info("Received %i tasks from the server", len(data))
req_groups = {} req_groups = {}
_tasks = []
for _task in data: for _task in data:
task = Task(**_task) task = Task(**_task)
@ -187,6 +188,7 @@ class ArgosAgent: # pylint: disable-msg=too-many-instance-attributes
"method": task.method, "method": task.method,
"request_data": task.request_data, "request_data": task.request_data,
} }
_tasks.append(_task)
requests = [] requests = []
for group, details in req_groups.items(): for group, details in req_groups.items():
@ -196,7 +198,7 @@ class ArgosAgent: # pylint: disable-msg=too-many-instance-attributes
await asyncio.gather(*requests) await asyncio.gather(*requests)
tasks = [] tasks = []
for task in response.json(): for task in _tasks:
tasks.append(self._complete_task(task)) tasks.append(self._complete_task(task))
if tasks: if tasks: