core: cleanup channels code, fix error when server side close

This commit is contained in:
Jens Langhammer
2020-12-13 17:46:34 +01:00
parent 3e49acf7ae
commit 3b5e1c7b34
4 changed files with 26 additions and 14 deletions

View File

@ -97,7 +97,12 @@ def outpost_token_ensurer(self: MonitoredTask):
all_outposts = Outpost.objects.all()
for outpost in all_outposts:
_ = outpost.token
self.set_status(TaskResult(TaskResultStatus.SUCCESSFUL, f"Successfully checked {len(all_outposts)} Outposts."))
self.set_status(
TaskResult(
TaskResultStatus.SUCCESSFUL,
[f"Successfully checked {len(all_outposts)} Outposts."],
)
)
@CELERY_APP.task()