ryry-cli 2.79__tar.gz → 2.81__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.79 → ryry_cli-2.81}/PKG-INFO +1 -1
  2. ryry_cli-2.81/ryry/constant.py +4 -0
  3. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/ryry_webapi.py +19 -1
  4. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/server_func.py +50 -1
  5. {ryry_cli-2.79 → ryry_cli-2.81}/ryry_cli.egg-info/PKG-INFO +1 -1
  6. {ryry_cli-2.79 → ryry_cli-2.81}/setup.py +1 -1
  7. ryry_cli-2.79/ryry/constant.py +0 -4
  8. {ryry_cli-2.79 → ryry_cli-2.81}/LICENSE +0 -0
  9. {ryry_cli-2.79 → ryry_cli-2.81}/README.md +0 -0
  10. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/__init__.py +0 -0
  11. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/main.py +0 -0
  12. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/ryry_server_socket.py +0 -0
  13. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/ryry_service.py +0 -0
  14. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/ryry_widget.py +0 -0
  15. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/script_template/__init__.py +0 -0
  16. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/script_template/main.py +0 -0
  17. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/script_template/run.py +0 -0
  18. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/store.py +0 -0
  19. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/task.py +0 -0
  20. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/taskUtils.py +0 -0
  21. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/upload.py +0 -0
  22. {ryry_cli-2.79 → ryry_cli-2.81}/ryry/utils.py +0 -0
  23. {ryry_cli-2.79 → ryry_cli-2.81}/ryry_cli.egg-info/SOURCES.txt +0 -0
  24. {ryry_cli-2.79 → ryry_cli-2.81}/ryry_cli.egg-info/dependency_links.txt +0 -0
  25. {ryry_cli-2.79 → ryry_cli-2.81}/ryry_cli.egg-info/entry_points.txt +0 -0
  26. {ryry_cli-2.79 → ryry_cli-2.81}/ryry_cli.egg-info/requires.txt +0 -0
  27. {ryry_cli-2.79 → ryry_cli-2.81}/ryry_cli.egg-info/top_level.txt +0 -0
  28. {ryry_cli-2.79 → ryry_cli-2.81}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 2.79
3
+ Version: 2.81
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -0,0 +1,4 @@
1
+ #!!!!! do not change this file !!!!!
2
+ app_version="2.81"
3
+ app_bulld_anchor="Noh_2025-01-17 18:37:26.952556"
4
+ app_name="ryry-cli"
@@ -335,4 +335,22 @@ def checkTask(checkUUID):
335
335
  elif r3["status"] == 2:
336
336
  return True, True, json.loads(r3["task_result"]), r3["progress"]
337
337
  elif r3["status"] == 3:
338
- return True, False, r3["fail_reason"], r3["progress"]
338
+ return True, False, r3["fail_reason"], r3["progress"]
339
+
340
+ def multiCheckTask(checkUUIDs):
341
+ req = {
342
+ "task_uuids": checkUUIDs
343
+ }
344
+ r1, r2, r3 = _aigc_post("aigc/task/checkTasks", req)
345
+ result = []
346
+ if r1 != 0:
347
+ for checkUUID in checkUUIDs:
348
+ result.append([checkUUID, False, False, "server fail", 0])
349
+ for r3_item in r3:
350
+ if r3_item["status"] < 2:
351
+ result.append([r3_item["uuid"], False, False, "", r3_item["progress"]])
352
+ elif r3_item["status"] == 2:
353
+ result.append([r3_item["uuid"], True, True, json.loads(r3_item["task_result"]), r3_item["progress"]])
354
+ elif r3_item["status"] == 3:
355
+ result.append([r3_item["uuid"], True, False, r3_item["fail_reason"], r3_item["progress"]])
356
+ return result
@@ -114,6 +114,55 @@ class Task:
114
114
  for t in self.thread_data.keys():
115
115
  result.append(self.thread_data[t]["result"])
116
116
  return result
117
+
118
+ class AsyncTask:
119
+ import urllib3
120
+ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
117
121
 
122
+ def __init__(self, func: str, params: dict, fromUUID=""):
123
+ self.params = params
124
+ self.func = func
125
+
126
+ realTaskUUID = fromUUID
127
+ if realTaskUUID == None or len(realTaskUUID) <= 0:
128
+ realTaskUUID = taskUtils.taskInfoWithFirstTask()
129
+
130
+ support_subdomain = upload.getFirstSupportSubdomain()
131
+ domain = ""
132
+ if support_subdomain:
133
+ domain = support_subdomain["readpath"]
134
+ self.params["fromUUID"] = realTaskUUID
135
+ self.params["domain"] = domain
136
+
137
+ def call(self):
138
+ cmd = task.cmdWithWidgetName(self.func)
139
+ if cmd:
140
+ raise Exception("local widget not support AsyncTask, please use Task")
141
+ else:
142
+ self.checkUUID = ryry_webapi.createTask(self.func, self.params)
143
+ return self.checkUUID
144
+
145
+ def cancel(self, taskUUID=None):
146
+ ryry_webapi.TaskCancel(taskUUID if taskUUID else self.checkUUID)
147
+ return True
118
148
 
119
-
149
+ def check(self, taskUUID=None):
150
+ finish, success, data, progress = ryry_webapi.checkTask(taskUUID if taskUUID else self.checkUUID)
151
+ return {
152
+ "finish": finish,
153
+ "success": success,
154
+ "data": data,
155
+ "progress": progress
156
+ }
157
+
158
+ def multiCheck(self, taskUUIDs):
159
+ results = ryry_webapi.multiCheckTask(taskUUIDs)
160
+ json_results = {}
161
+ for [taskUUID, finish, success, data, progress] in results:
162
+ json_results[taskUUID] = {
163
+ "finish": finish,
164
+ "success": success,
165
+ "data": data,
166
+ "progress": progress
167
+ }
168
+ return json_results
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 2.79
3
+ Version: 2.81
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.79"
6
+ ryry_version = "2.81"
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:
@@ -1,4 +0,0 @@
1
- #!!!!! do not change this file !!!!!
2
- app_version="2.79"
3
- app_bulld_anchor="Noh_2024-12-30 11:08:43.067080"
4
- 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