ryry-cli 2.23__tar.gz → 2.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {ryry_cli-2.23/ryry_cli.egg-info → ryry_cli-2.26}/PKG-INFO +1 -1
  2. ryry_cli-2.26/ryry/constant.py +5 -0
  3. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/ryry_server_socket.py +19 -2
  4. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/ryry_webapi.py +1 -0
  5. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/store.py +7 -4
  6. {ryry_cli-2.23 → ryry_cli-2.26/ryry_cli.egg-info}/PKG-INFO +1 -1
  7. {ryry_cli-2.23 → ryry_cli-2.26}/setup.py +1 -1
  8. ryry_cli-2.23/ryry/constant.py +0 -5
  9. {ryry_cli-2.23 → ryry_cli-2.26}/LICENSE +0 -0
  10. {ryry_cli-2.23 → ryry_cli-2.26}/README.md +0 -0
  11. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/__init__.py +0 -0
  12. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/main.py +0 -0
  13. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/ryry_service.py +0 -0
  14. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/ryry_widget.py +0 -0
  15. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/script_template/__init__.py +0 -0
  16. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/script_template/main.py +0 -0
  17. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/script_template/run.py +0 -0
  18. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/server_func.py +0 -0
  19. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/task.py +0 -0
  20. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/taskUtils.py +0 -0
  21. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/upload.py +0 -0
  22. {ryry_cli-2.23 → ryry_cli-2.26}/ryry/utils.py +0 -0
  23. {ryry_cli-2.23 → ryry_cli-2.26}/ryry_cli.egg-info/SOURCES.txt +0 -0
  24. {ryry_cli-2.23 → ryry_cli-2.26}/ryry_cli.egg-info/dependency_links.txt +0 -0
  25. {ryry_cli-2.23 → ryry_cli-2.26}/ryry_cli.egg-info/entry_points.txt +0 -0
  26. {ryry_cli-2.23 → ryry_cli-2.26}/ryry_cli.egg-info/requires.txt +0 -0
  27. {ryry_cli-2.23 → ryry_cli-2.26}/ryry_cli.egg-info/top_level.txt +0 -0
  28. {ryry_cli-2.23 → ryry_cli-2.26}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 2.23
3
+ Version: 2.26
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -0,0 +1,5 @@
1
+ #!!!!! do not change this file !!!!!
2
+ app_version="2.26"
3
+ app_bulld_number=226
4
+ app_bulld_anchor="Noh_2024-08-05 19:23:55.100225"
5
+ app_name="ryry-cli"
@@ -166,15 +166,32 @@ class RyryShortConnectThread(Thread):
166
166
 
167
167
  def run(self):
168
168
  print(f" {self.name} start")
169
- what_time = 2
169
+ min_wait_time = 2
170
+ max_wait_time = 10
171
+ wait_time = min_wait_time
172
+ consecutive_step = 2
173
+ consecutive_failures = 0
174
+ max_consecutive_failures = 10
175
+
170
176
  while (self.is_running):
171
177
  try:
172
178
  datas = ryry_webapi.GetTask()
173
179
  for it in datas:
174
180
  self.executor.appendTask(it, self.taskCallback)
181
+
182
+ # if task empty -> full, set wait_time = max -> min
183
+ if len(datas) > 0:
184
+ consecutive_failures = 0
185
+ wait_time = max(min_wait_time, wait_time - consecutive_step)
186
+ else:
187
+ consecutive_failures += 1
188
+ if consecutive_failures >= max_consecutive_failures:
189
+ wait_time = min(max_wait_time, wait_time + consecutive_step)
190
+ consecutive_failures = 0
175
191
  except Exception as ex:
176
192
  taskUtils.taskPrint(None, f"{self.name} === exception : {ex}")
177
- time.sleep(what_time)
193
+ time.sleep(wait_time)
194
+
178
195
  print(f" {self.name} stop")
179
196
 
180
197
  def markStop(self):
@@ -58,6 +58,7 @@ def GetTask():
58
58
  req = {
59
59
  "widget_map": json.dumps(widget_map),
60
60
  "limit": 1,
61
+ "extend": _extend()
61
62
  }
62
63
  r1, r2, r3 = _aigc_post("aigc/task/getTask", req)
63
64
  if r1 != 0:
@@ -67,10 +67,13 @@ def insertWidget(widget_id, path):
67
67
  if "widgets" not in read_data:
68
68
  read_data["widgets"] = {}
69
69
  widgetsMap = read_data["widgets"]
70
- widgetsMap[widget_id] = {
71
- "isBlock": False,
72
- "path" : path
73
- }
70
+ if widget_id in widgetsMap:
71
+ widgetsMap[widget_id]["path"] = path
72
+ else:
73
+ widgetsMap[widget_id] = {
74
+ "isBlock": False,
75
+ "path" : path
76
+ }
74
77
  for k in list(widgetsMap.keys()):
75
78
  if isinstance(widgetsMap[k], (dict)):
76
79
  if os.path.exists(widgetsMap[k]["path"]) == False:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 2.23
3
+ Version: 2.26
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -3,7 +3,7 @@ import os
3
3
  import subprocess
4
4
  import datetime
5
5
 
6
- ryry_version = "2.23"
6
+ ryry_version = "2.26"
7
7
  ryry_build_number = int(ryry_version.replace(".",""))
8
8
  cur_dir = os.path.dirname(os.path.abspath(__file__))
9
9
  constanspy = os.path.join(cur_dir, "ryry", "constant.py")
@@ -1,5 +0,0 @@
1
- #!!!!! do not change this file !!!!!
2
- app_version="2.23"
3
- app_bulld_number=223
4
- app_bulld_anchor="Noh_2024-07-18 19:08:44.202353"
5
- app_name="ryry-cli"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes