Commit 157103d8 authored by Janez K's avatar Janez K
Browse files

celery inside engine

parent 64602efe
import workflows.library import workflows.library
import time import time
import random import random
from workflows.tasks import *
class WidgetRunner(): class WidgetRunner():
def __init__(self,widget,workflow_runner,standalone=False): def __init__(self,widget,workflow_runner,standalone=False):
...@@ -31,6 +32,14 @@ class WidgetRunner(): ...@@ -31,6 +32,14 @@ class WidgetRunner():
if self.widget.abstract_widget.wsdl != '': if self.widget.abstract_widget.wsdl != '':
input_dict['wsdl']=self.widget.abstract_widget.wsdl input_dict['wsdl']=self.widget.abstract_widget.wsdl
input_dict['wsdl_method']=self.widget.abstract_widget.wsdl_method input_dict['wsdl_method']=self.widget.abstract_widget.wsdl_method
if self.abstract_widget.windows_queue and settings.USE_WINDOWS_QUEUE:
if self.widget.abstract_widget.has_progress_bar:
outputs = executeWidgetFunction.apply_async([self.widget,input_dict],queue="windows").wait()
elif self.widget.abstract_widget.is_streaming:
outputs = executeWidgetProgressBar.apply_async([self.widget,input_dict],queue="windows").wait()
else:
outputs = executeWidgetStreaming.apply_async([self.widget,input_dict],queue="windows").wait()
else:
if self.widget.abstract_widget.has_progress_bar: if self.widget.abstract_widget.has_progress_bar:
outputs = function_to_call(input_dict,self.widget) outputs = function_to_call(input_dict,self.widget)
elif self.widget.abstract_widget.is_streaming: elif self.widget.abstract_widget.is_streaming:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment