mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
convert remaining function
This commit is contained in:
parent
728cccc469
commit
fb55f5d2a2
@ -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,
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user