outposts: add message to outpost_service_connection_monitor task
This commit is contained in:
parent
55aab5660b
commit
222cece3e1
|
@ -49,9 +49,15 @@ def outpost_service_connection_state(connection_pk: Any):
|
||||||
@CELERY_APP.task(bind=True, base=MonitoredTask)
|
@CELERY_APP.task(bind=True, base=MonitoredTask)
|
||||||
def outpost_service_connection_monitor(self: MonitoredTask):
|
def outpost_service_connection_monitor(self: MonitoredTask):
|
||||||
"""Regularly check the state of Outpost Service Connections"""
|
"""Regularly check the state of Outpost Service Connections"""
|
||||||
for connection in OutpostServiceConnection.objects.all():
|
connections = OutpostServiceConnection.objects.all()
|
||||||
|
for connection in connections.iterator():
|
||||||
outpost_service_connection_state.delay(connection.pk)
|
outpost_service_connection_state.delay(connection.pk)
|
||||||
self.set_status(TaskResult(TaskResultStatus.SUCCESSFUL))
|
self.set_status(
|
||||||
|
TaskResult(
|
||||||
|
TaskResultStatus.SUCCESSFUL,
|
||||||
|
[f"Successfully updated {len(connections)} connections."],
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@CELERY_APP.task(bind=True, base=MonitoredTask)
|
@CELERY_APP.task(bind=True, base=MonitoredTask)
|
||||||
|
|
Reference in New Issue