Commit 926f449 1 parent 646668c commit 926f449 Copy full SHA for 926f449
File tree 1 file changed +11
-2
lines changed
api/src/backend/tasks/jobs
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -344,9 +344,18 @@ def perform_prowler_scan(
344
344
total_requirements = compliance ["total_requirements" ],
345
345
)
346
346
)
347
- with rls_transaction (tenant_id ):
348
- ComplianceOverview .objects .bulk_create (compliance_overview_objects )
347
+ try :
348
+ with rls_transaction (tenant_id ):
349
+ ComplianceOverview .objects .bulk_create (
350
+ compliance_overview_objects , batch_size = 100
351
+ )
352
+ except Exception as overview_exception :
353
+ import sentry_sdk
349
354
355
+ sentry_sdk .capture_exception (overview_exception )
356
+ logger .error (
357
+ f"Error storing compliance overview for scan { scan_id } : { overview_exception } "
358
+ )
350
359
if exception is not None :
351
360
raise exception
352
361
You can’t perform that action at this time.
0 commit comments