ryry-cli 6.11__tar.gz → 6.14__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 (32) hide show
  1. {ryry_cli-6.11/ryry_cli.egg-info → ryry_cli-6.14}/PKG-INFO +2 -2
  2. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/constant.py +2 -2
  3. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/ryry_server_socket.py +9 -9
  4. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/script_template/main.py +1 -0
  5. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/server_func.py +0 -1
  6. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/shared_memory.py +0 -2
  7. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/store.py +1 -1
  8. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/taskUtils.py +1 -0
  9. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/upload.py +21 -0
  10. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/utils.py +6 -1
  11. {ryry_cli-6.11 → ryry_cli-6.14/ryry_cli.egg-info}/PKG-INFO +2 -2
  12. {ryry_cli-6.11 → ryry_cli-6.14}/ryry_cli.egg-info/requires.txt +1 -1
  13. {ryry_cli-6.11 → ryry_cli-6.14}/setup.py +2 -2
  14. {ryry_cli-6.11 → ryry_cli-6.14}/LICENSE +0 -0
  15. {ryry_cli-6.11 → ryry_cli-6.14}/README.md +0 -0
  16. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/__init__.py +0 -0
  17. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/daemon_base.py +0 -0
  18. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/daemon_manager.py +0 -0
  19. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/main.py +0 -0
  20. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/proxy_manager.py +0 -0
  21. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/ryry_service.py +0 -0
  22. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/ryry_webapi.py +0 -0
  23. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/ryry_widget.py +0 -0
  24. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/script_template/__init__.py +0 -0
  25. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/script_template/daemon.py +0 -0
  26. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/script_template/run.py +0 -0
  27. {ryry_cli-6.11 → ryry_cli-6.14}/ryry/task.py +0 -0
  28. {ryry_cli-6.11 → ryry_cli-6.14}/ryry_cli.egg-info/SOURCES.txt +0 -0
  29. {ryry_cli-6.11 → ryry_cli-6.14}/ryry_cli.egg-info/dependency_links.txt +0 -0
  30. {ryry_cli-6.11 → ryry_cli-6.14}/ryry_cli.egg-info/entry_points.txt +0 -0
  31. {ryry_cli-6.11 → ryry_cli-6.14}/ryry_cli.egg-info/top_level.txt +0 -0
  32. {ryry_cli-6.11 → ryry_cli-6.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 6.11
3
+ Version: 6.14
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -16,7 +16,7 @@ Requires-Dist: uuid
16
16
  Requires-Dist: Image
17
17
  Requires-Dist: pillow
18
18
  Requires-Dist: psutil
19
- Requires-Dist: pynvml
19
+ Requires-Dist: nvidia-ml-py
20
20
  Requires-Dist: requests_toolbelt
21
21
  Requires-Dist: fake_useragent
22
22
  Requires-Dist: gputil
@@ -1,6 +1,6 @@
1
1
  #!!!!! do not change this file !!!!!
2
- app_version="6.11"
3
- app_bulld_anchor="Noh_2025-11-13 21:32:21.253519"
2
+ app_version="6.14"
3
+ app_bulld_anchor="Noh_2026-05-15 22:09:11.985350"
4
4
  app_name="ryry-cli"
5
5
  import sys, os
6
6
  if getattr(sys, 'frozen', False):
@@ -225,13 +225,13 @@ class RyryShortConnectThread(Thread):
225
225
 
226
226
  def run(self):
227
227
  print(f" {self.name} start")
228
- min_wait_time = 5
229
- max_wait_time = 60
230
- wait_time = min_wait_time
231
- consecutive_step = 10
232
- consecutive_failures = 0
233
- max_consecutive_failures = 10
234
- last_check_time = 0
228
+ min_wait_time = 5 #最小任务拉取间隔
229
+ max_wait_time = 60 #最大任务拉取间隔
230
+ wait_time = min_wait_time #当前任务拉取间隔
231
+ consecutive_step = 10 #连续失败次数增加的间隔
232
+ consecutive_failures = 0 #连续失败次数
233
+ max_consecutive_failures = 10 #最大连续失败次数
234
+ last_check_time = 0 #上次检查时间
235
235
 
236
236
  while (self.is_running):
237
237
  try:
@@ -244,10 +244,10 @@ class RyryShortConnectThread(Thread):
244
244
  for it in map:
245
245
  if isinstance(map[it], (dict)):
246
246
  if map[it]["isBlock"] == False and self.executor.widgetHasPower(it):
247
- widget_list[it] = map[it]["version"]
247
+ widget_list[it] = map[it].get("version", "0.0")
248
248
  else:
249
249
  if self.executor.widgetHasPower(it):
250
- widget_list[it] = map[it]["version"]
250
+ widget_list[it] = map[it].get("version", "0.0")
251
251
  datas = ryry_webapi.GetTask(widget_list)
252
252
  for it in datas:
253
253
  self.executor.appendTask(it, self.taskCallback)
@@ -20,6 +20,7 @@ def main(cmd_opts):
20
20
  result = runTask(data)
21
21
  with open(cmd_opts.out, 'w', encoding='utf-8') as f:
22
22
  json.dump(result, f)
23
+ os._exit(0)
23
24
 
24
25
  if __name__ == '__main__':
25
26
  main(cmd_opts)
@@ -49,7 +49,6 @@ class TaskThread(Thread):
49
49
  self.checkUUID = "local_" + ''.join(str(uuid.uuid4()).split('-'))
50
50
  self.params["task_id"] = self.checkUUID
51
51
  executeSuccess, result_obj = task.executeLocalPython(self.checkUUID, cmd, self.params, self.timeout)
52
- print(f"============={result_obj}")
53
52
  if executeSuccess and result_obj["status"] == 0:
54
53
  self.call_back(self.idx, result_obj["result"])
55
54
  return
@@ -541,7 +541,6 @@ class SharedMemoryService:
541
541
  """获取最大计数器(只读操作)"""
542
542
  data = self._read_data()
543
543
  max_counter = data.get("max_counter", 1)
544
- print(f"get_max_counter = {max_counter}")
545
544
  return max_counter
546
545
 
547
546
  def set_cur_counter(self, cur_counter: int):
@@ -556,7 +555,6 @@ class SharedMemoryService:
556
555
  """获取当前计数器(只读操作)"""
557
556
  data = self._read_data()
558
557
  cur_counter = data.get("cur_counter", 0)
559
- print(f"get_cur_counter = {cur_counter}")
560
558
  return cur_counter
561
559
 
562
560
  def increment_cur_counter(self) -> int:
@@ -177,7 +177,7 @@ def extend():
177
177
  _genExtend()
178
178
  elif read_data["extend"].get("device_id", "") != read_data.get("deviceInfo", {}).get("device_id", ""):
179
179
  _genExtend()
180
- elif read_data["extend"].get("app", "") == "ryry-cli 6.11":
180
+ elif read_data["extend"].get("app", "") == "ryry-cli 6.14":
181
181
  _genExtend()
182
182
  else:
183
183
  _genExtend()
@@ -235,6 +235,7 @@ def notifyCounterIfNeed():
235
235
  >失败<font color=\"warning\">{f_cnt}</font>个"
236
236
  }
237
237
  })
238
+ os.remove(task_counter_file)
238
239
 
239
240
  # import subprocess, platform
240
241
  # #darwin Command Line cannot create pyplot gui because not application with gui
@@ -103,6 +103,9 @@ def uploadByDomain(src, targetDomain, taskUUID, keepItAlways=False, uploadPath=N
103
103
  needTranscode=needTranscode,
104
104
  needAddtionUrl=True) #mecord会使用签名信息,强制needAddtionUrl
105
105
 
106
+ if isMekoConfig(parsed_domain):
107
+ return uploadToMeko(src, ext=ext)
108
+
106
109
  oss_config = getOssConfig(parsed_domain)
107
110
  if oss_config:
108
111
  new_file_name = ''.join(str(uuid.uuid4()).split('-'))
@@ -150,6 +153,17 @@ def parseDomainAndPath(targetDomain):
150
153
 
151
154
  return targetDomain, ""
152
155
 
156
+ def uploadToMeko(file_path: str, ext: str = ".jpg") -> str:
157
+ import requests
158
+ url = "https://api.mekoapp.com/upload/create"
159
+
160
+ with open(file_path, "rb") as f:
161
+ files = {"file": (file_path.split("/")[-1], f)}
162
+ data = {"ext": ext}
163
+ response = requests.post(url, files=files, data=data)
164
+ response.raise_for_status()
165
+ return response.json()["url"]
166
+
153
167
  def uploadToOss(file, new_file_name, oss_config, upload_path=""):
154
168
  import hashlib
155
169
  import hmac
@@ -339,6 +353,7 @@ DOMAIN_CONFIG = {
339
353
  "oss.zjtemplate.com": {"type": "oss", "config": oss_template_config},
340
354
  "*.mecoai.cn": {"type": "mecord-cli", "config": {}},
341
355
  "*.mecordai.com": {"type": "mecord-cli", "config": {}},
356
+ "*.mekoapp.com": {"type": "", "config": {}},
342
357
  }
343
358
 
344
359
  FTP_REPLACEMENT = {
@@ -374,6 +389,12 @@ def isMecordConfig(targetDomain):
374
389
  return True
375
390
  return False
376
391
 
392
+ def isMekoConfig(targetDomain):
393
+ config = get_domain_config(targetDomain)
394
+ if config:
395
+ return True
396
+ return False
397
+
377
398
  def getFtpConfig(targetDomain):
378
399
  config = get_domain_config(targetDomain)
379
400
  if config and config["type"] == "ftp":
@@ -6,7 +6,10 @@ import sys
6
6
  import requests
7
7
  from io import BytesIO
8
8
  import psutil
9
- import pynvml
9
+ try:
10
+ import pynvml
11
+ except ImportError:
12
+ pynvml = None
10
13
  from datetime import datetime, timedelta
11
14
  import http
12
15
  import json
@@ -167,6 +170,8 @@ def deviceInfo():
167
170
  "host_name": hostname
168
171
  }
169
172
  try:
173
+ if pynvml is None:
174
+ raise ImportError("pynvml/nvidia-ml-py not available")
170
175
  pynvml.nvmlInit()
171
176
  gpuCount = pynvml.nvmlDeviceGetCount()
172
177
  data["gpu"]["count"] = gpuCount
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 6.11
3
+ Version: 6.14
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -16,7 +16,7 @@ Requires-Dist: uuid
16
16
  Requires-Dist: Image
17
17
  Requires-Dist: pillow
18
18
  Requires-Dist: psutil
19
- Requires-Dist: pynvml
19
+ Requires-Dist: nvidia-ml-py
20
20
  Requires-Dist: requests_toolbelt
21
21
  Requires-Dist: fake_useragent
22
22
  Requires-Dist: gputil
@@ -3,7 +3,7 @@ uuid
3
3
  Image
4
4
  pillow
5
5
  psutil
6
- pynvml
6
+ nvidia-ml-py
7
7
  requests_toolbelt
8
8
  fake_useragent
9
9
  gputil
@@ -3,7 +3,7 @@ import os
3
3
  import subprocess
4
4
  import datetime
5
5
 
6
- ryry_version = "6.11"
6
+ ryry_version = "6.14"
7
7
  cur_dir = os.path.dirname(os.path.abspath(__file__))
8
8
  constanspy = os.path.join(cur_dir, "ryry", "constant.py")
9
9
  try:
@@ -63,7 +63,7 @@ setuptools.setup(
63
63
  'Image',
64
64
  'pillow',
65
65
  'psutil',
66
- 'pynvml',
66
+ 'nvidia-ml-py',
67
67
  'requests_toolbelt',
68
68
  'fake_useragent',
69
69
  'gputil',
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