fix(api): add one second countdown to scheduled scan task to ensure transaction completion (#9528)

Co-authored-by: Adrián Peña <adrianjpr@gmail.com>
This commit is contained in:
Prowler BotandAdrián Peña authored and GitHub committed 2025-12-12 11:10:40 +01:00
1 parent 631af40d04
commit 6e69f335cd
5 files changed
+9 -3

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
openapi: 3.0.3
info:
title: Prowler API
version: 1.16.0
version: 1.16.1
description: |-
Prowler API specification.
+1 -1
View File
@@ -357,7 +357,7 @@ class SchemaView(SpectacularAPIView):
def get(self, request, *args, **kwargs):
spectacular_settings.TITLE = "Prowler API"
spectacular_settings.VERSION = "1.16.0"
spectacular_settings.VERSION = "1.16.1"
spectacular_settings.DESCRIPTION = (
"Prowler API specification.\n\nThis file is auto-generated."
)
+1
View File
@@ -61,4 +61,5 @@ def schedule_provider_scan(provider_instance: Provider):
"tenant_id": str(provider_instance.tenant_id),
"provider_id": provider_id,
},
countdown=1, # Avoid race conditions between the worker and the database
)
+1
View File
@@ -28,6 +28,7 @@ class TestScheduleProviderScan:
"tenant_id": str(provider_instance.tenant_id),
"provider_id": str(provider_instance.id),
},
countdown=1,
)
task_name = f"scan-perform-scheduled-{provider_instance.id}"