代码拉取完成,页面将自动刷新
"""
This is the mother class for engine executing executing questions in EleData.
@params:
- group:
Model Object of user group, corresponding for retrieving the entity data and the destination for the output(event).
And all executing engine should experience the same life-cycle:
Initializing Engine
- engine.init()
"""
from multiprocessing import Process
from abc import abstractmethod
class BaseEngine(object):
group = None
response = None
params = None
def __init__(self, event_id, group, params):
self.event_id = event_id
self.group = group
self.params = params
@abstractmethod
def execute(self):
"""
void function to update intermediate/ ultimate response
"""
@abstractmethod
def event_init(self):
"""
(When engine is for Event Response)
void function to update
"""
def get_processed(self):
"""
(When engine is not for Event Response)
Return engine response in series way
:return: engine ultimate response
"""
return self.response
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。