algSwitch-flag
This commit is contained in:
parent
d43559e72c
commit
7f85fab1d8
|
|
@ -27,6 +27,18 @@ class FileUpload(Thread):
|
||||||
self._storage_source = self._context['service']['storage_source']
|
self._storage_source = self._context['service']['storage_source']
|
||||||
self._algStatus = False # 默认关闭
|
self._algStatus = False # 默认关闭
|
||||||
self._algSwitch = self._context['service']['algSwitch']
|
self._algSwitch = self._context['service']['algSwitch']
|
||||||
|
|
||||||
|
|
||||||
|
# for algswitch flag:
|
||||||
|
default_enabled = str(self._msg.get("defaultEnabled","True")).lower() == "true"
|
||||||
|
|
||||||
|
if default_enabled:
|
||||||
|
self._algSwitch= True
|
||||||
|
else:
|
||||||
|
self._algSwitch= False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#如果任务是在线、离线处理,则用此类
|
#如果任务是在线、离线处理,则用此类
|
||||||
class ImageFileUpload(FileUpload):
|
class ImageFileUpload(FileUpload):
|
||||||
__slots__ = ()
|
__slots__ = ()
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,16 @@ class PushStreamProcess(Process):
|
||||||
self._algStatus = False # 默认关闭
|
self._algStatus = False # 默认关闭
|
||||||
self._algSwitch = self._context['service']['algSwitch']
|
self._algSwitch = self._context['service']['algSwitch']
|
||||||
|
|
||||||
|
|
||||||
|
# for algswitch flag:
|
||||||
|
default_enabled = str(self._msg.get("defaultEnabled","True")).lower() == "true"
|
||||||
|
|
||||||
|
if default_enabled:
|
||||||
|
self._algSwitch= True
|
||||||
|
else:
|
||||||
|
self._algSwitch= False
|
||||||
|
|
||||||
|
|
||||||
def build_logo_url(self):
|
def build_logo_url(self):
|
||||||
logo = None
|
logo = None
|
||||||
if self._context["video"]["video_add_water"]:
|
if self._context["video"]["video_add_water"]:
|
||||||
|
|
|
||||||
|
|
@ -244,6 +244,17 @@ class DispatcherService:
|
||||||
|
|
||||||
# 开启实时进程
|
# 开启实时进程
|
||||||
def startOnlineProcess(self, msg, analysisType):
|
def startOnlineProcess(self, msg, analysisType):
|
||||||
|
|
||||||
|
|
||||||
|
# for algswitch flag:
|
||||||
|
default_enabled = str(msg.get("defaultEnabled","True")).lower() == "true"
|
||||||
|
|
||||||
|
if default_enabled:
|
||||||
|
self.__context['service']['algSwitch'] = True
|
||||||
|
else:
|
||||||
|
self.__context['service']['algSwitch'] = False
|
||||||
|
|
||||||
|
|
||||||
if self.__listeningProcesses.get(msg["request_id"]):
|
if self.__listeningProcesses.get(msg["request_id"]):
|
||||||
logger.warning("实时重复任务,请稍后再试!requestId:{}", msg["request_id"])
|
logger.warning("实时重复任务,请稍后再试!requestId:{}", msg["request_id"])
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue