convert remaining function

This commit is contained in:
Matthias 2022-05-17 01:32:08 +02:00
parent 728cccc469
commit fb55f5d2a2
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ def trigger_event(event, *args, **kwargs):
logger.debug(f"Event triggered: '{event}'")
offload_task(
'plugin.events.register_event',
register_event,
event,
*args,
**kwargs
@ -72,7 +72,7 @@ def register_event(event, *args, **kwargs):
# Offload a separate task for each plugin
offload_task(
'plugin.events.process_event',
process_event,
slug,
event,
*args,

View File

@ -56,7 +56,7 @@ class LocatePluginView(APIView):
try:
StockItem.objects.get(pk=item_pk)
offload_task('plugin.registry.call_function', plugin, 'locate_stock_item', item_pk)
offload_task(registry.call_function, plugin, 'locate_stock_item', item_pk)
data['item'] = item_pk
@ -69,7 +69,7 @@ class LocatePluginView(APIView):
try:
StockLocation.objects.get(pk=location_pk)
offload_task('plugin.registry.call_function', plugin, 'locate_stock_location', location_pk)
offload_task(registry.call_function, plugin, 'locate_stock_location', location_pk)
data['location'] = location_pk