Imported outputs from external module to facilitate thread building and consistent runtime operation from various entrypoints
This commit is contained in:
@@ -3,6 +3,7 @@ import logging
|
||||
|
||||
from core.runtime.outputs import buildOutput
|
||||
from core.runtime.firewall import buildFirewall
|
||||
from core.runtime.createruntime import outputs
|
||||
|
||||
|
||||
def buildListener(listener, self):
|
||||
@@ -24,20 +25,22 @@ def buildListener(listener, self):
|
||||
data = self.rfile.read(content_length)
|
||||
request = json.loads(data)
|
||||
|
||||
outputs = {}
|
||||
#outputs = {}
|
||||
|
||||
buildOutput(data, listener, outputs)
|
||||
|
||||
allow, status_code = buildFirewall(listener, outputs)
|
||||
|
||||
if allow:
|
||||
from core.execution.executioncontract import executeContract
|
||||
#from core.execution.executioncontract import executeContract
|
||||
from core.execution.createthread import buildThread
|
||||
|
||||
#Print allowed items for logging purposes
|
||||
logging.info(outputs["firewall_allowed"])
|
||||
|
||||
#Process and forward to RMASS
|
||||
responses = executeContract(listener.execute, outputs)
|
||||
#responses = executeContract(listener.execute, outputs)
|
||||
thread = buildThread(listener.execute)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user