tasks/clean_observations: Fix premature task termination in 'stage' environment
Skip the archival of old observations which just got deleted instead of terminating the whole task at this point. Signed-off-by: Fabian P. Schmidt <kerel@mailbox.org>merge-requests/861/head 1.23
parent
1635a14640
commit
538ea52c1a
|
@ -178,7 +178,7 @@ def clean_observations():
|
||||||
if settings.ENVIRONMENT == 'stage':
|
if settings.ENVIRONMENT == 'stage':
|
||||||
if not obs.is_good:
|
if not obs.is_good:
|
||||||
obs.delete()
|
obs.delete()
|
||||||
return
|
continue
|
||||||
if os.path.isfile(obs.payload.path):
|
if os.path.isfile(obs.payload.path):
|
||||||
archive_audio.delay(obs.id)
|
archive_audio.delay(obs.id)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue