Browse Source

Merge branch 'develop' of gitadmin/tuoheng_alg into release

tags/V2.7.7^2
chenyukun 1 year ago
parent
commit
8151cd1e40
5 changed files with 31 additions and 29 deletions
  1. +11
    -10
      .idea/workspace.xml
  2. +2
    -1
      concurrency/IntelligentRecognitionProcess.py
  3. +1
    -1
      config/dsp_application.json
  4. +1
    -1
      service/Dispatcher.py
  5. +16
    -16
      test/路径/Test.py

+ 11
- 10
.idea/workspace.xml View File

@@ -6,8 +6,8 @@
<component name="ChangeListManager">
<list default="true" id="4f7dccd9-8f92-4a6e-90cc-33890d102263" name="Changes" comment="Changes">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/dsp_application.json" beforeDir="false" afterPath="$PROJECT_DIR$/config/dsp_application.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/service/Dispatcher.py" beforeDir="false" afterPath="$PROJECT_DIR$/service/Dispatcher.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" beforeDir="false" afterPath="$PROJECT_DIR$/concurrency/IntelligentRecognitionProcess.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/路径/Test.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/路径/Test.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -136,7 +136,7 @@
&quot;WebServerToolWindowPanel.toolwindow.show.date&quot;: &quot;false&quot;,
&quot;WebServerToolWindowPanel.toolwindow.show.permissions&quot;: &quot;false&quot;,
&quot;WebServerToolWindowPanel.toolwindow.show.size&quot;: &quot;false&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/tuoheng/code1/alg_aaa/streamTool&quot;,
&quot;last_opened_file_path&quot;: &quot;D:/tuoheng/codenew/tuoheng_tool&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
@@ -151,11 +151,11 @@
}</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="D:\tuoheng\codenew\tuoheng_alg\enums" />
<recent name="D:\tuoheng\codenew\tuoheng_alg\entity" />
<recent name="D:\tuoheng\codenew\tuoheng_alg\test\读写" />
<recent name="D:\tuoheng\codenew\tuoheng_alg\config" />
<recent name="D:\tuoheng\codenew\tuoheng_alg\test\算法" />
<recent name="D:\tuoheng\codenew\tuoheng_alg\test\语法" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="D:\tuoheng\codenew\tuoheng_alg\config" />
@@ -527,7 +527,13 @@
<workItem from="1687652018398" duration="8524000" />
<workItem from="1687736740408" duration="603000" />
<workItem from="1687737713032" duration="3837000" />
<workItem from="1687779451916" duration="1653000" />
<workItem from="1687779451916" duration="5176000" />
<workItem from="1687933838564" duration="4146000" />
<workItem from="1687954592393" duration="1199000" />
<workItem from="1687997778160" duration="3792000" />
<workItem from="1688021144565" duration="1972000" />
<workItem from="1688083600084" duration="65000" />
<workItem from="1688083679443" duration="2398000" />
</task>
<servers />
</component>
@@ -563,11 +569,6 @@
<line>134</line>
<option name="timeStamp" value="6" />
</line-breakpoint>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/service/Dispatcher.py</url>
<line>350</line>
<option name="timeStamp" value="9" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>

+ 2
- 1
concurrency/IntelligentRecognitionProcess.py View File

@@ -74,6 +74,7 @@ class IntelligentRecognitionProcess(Process):
self._analyse_type = param.analyse_type
self._enable_add_water = bool(self._context["video"]["video_add_water"])
self.start_proccess_time = time.time()
self._logo = None
if self._enable_add_water:
self._logo = self._msg.get("logo_url")
if self._logo:
@@ -1442,7 +1443,7 @@ class ScreenRecordingProcess(Process):
hb = None
try:
# 程序开始时间
init_log(self._context)
init_log(self._base_dir)
pullThread = self.start_pull_stream_thread()
cv2tool = Cv2Util(orFilePath=self._orFilePath, requestId=self._msg.get("request_id"))
hb = self.start_hb_thread()

+ 1
- 1
config/dsp_application.json View File

@@ -92,7 +92,7 @@
},
"video": {
"file_path": "../dsp/video/",
"video_add_water": 1
"video_add_water": 0
},
"service": {
"frame_score": 0.4,

+ 1
- 1
service/Dispatcher.py View File

@@ -114,7 +114,7 @@ class DispatcherService:
end_time = now - task_process.start_proccess_time
if end_time > 80 and task_process.pullQueue.full() and time.time() - persistent_time < 10:
full_count += 1
if full_count > 2:
if full_count > 4:
logger.error("服务器资源限制, 暂无资源可以使用! requestId:{}", requestId)
task_process.sendEvent({"command": "stop_ex"})
full_count = 0

+ 16
- 16
test/路径/Test.py View File

@@ -1,16 +1,16 @@
import os
import sys
from util import RWUtils, LogUtils
from loguru import logger
print(os.getcwd())
print(os.path.relpath(__file__))
base_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
content = YmlUtils.getConfigs(base_dir + "/../../")
LogUtils.init_log(content)
try:
2/0
except Exception as e:
logger.exception("异常信息:{}", e)
# import os
# import sys
#
# from util import RWUtils, LogUtils
# from loguru import logger
# print(os.getcwd())
#
# print(os.path.relpath(__file__))
# base_dir = os.path.dirname(os.path.realpath(sys.argv[0]))
# content = YmlUtils.getConfigs(base_dir + "/../../")
# LogUtils.init_log(content)
#
# try:
# 2/0
# except Exception as e:
# logger.exception("异常信息:{}", e)

Loading…
Cancel
Save