@@ -1092,7 +1092,9 @@ def save(self, *args, **kwargs):
10921092 super (Product , product ).save ()
10931093 # launch the async task to update all finding sla expiration dates
10941094 from dojo .sla_config .helpers import async_update_sla_expiration_dates_sla_config_sync # noqa: I001, PLC0415 circular import
1095- async_update_sla_expiration_dates_sla_config_sync (self , products , severities = severities )
1095+ from dojo .celery_dispatch import dojo_dispatch_task # noqa: PLC0415 circular import
1096+
1097+ dojo_dispatch_task (async_update_sla_expiration_dates_sla_config_sync , self , products , severities = severities )
10961098
10971099 def clean (self ):
10981100 sla_days = [self .critical , self .high , self .medium , self .low ]
@@ -1252,7 +1254,9 @@ def save(self, *args, **kwargs):
12521254 super (SLA_Configuration , sla_config ).save ()
12531255 # launch the async task to update all finding sla expiration dates
12541256 from dojo .sla_config .helpers import async_update_sla_expiration_dates_sla_config_sync # noqa: I001, PLC0415 circular import
1255- async_update_sla_expiration_dates_sla_config_sync (sla_config , Product .objects .filter (id = self .id ))
1257+ from dojo .celery_dispatch import dojo_dispatch_task # noqa: PLC0415 circular import
1258+
1259+ dojo_dispatch_task (async_update_sla_expiration_dates_sla_config_sync , sla_config , Product .objects .filter (id = self .id ))
12561260
12571261 def get_absolute_url (self ):
12581262 return reverse ("view_product" , args = [str (self .id )])
0 commit comments