ryry-cli 2.19__tar.gz → 2.21__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.
- {ryry_cli-2.19/ryry_cli.egg-info → ryry_cli-2.21}/PKG-INFO +1 -3
- ryry_cli-2.21/ryry/constant.py +5 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/ryry_server_socket.py +1 -1
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/ryry_widget.py +9 -6
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/task.py +2 -2
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/taskUtils.py +32 -35
- {ryry_cli-2.19 → ryry_cli-2.21/ryry_cli.egg-info}/PKG-INFO +1 -3
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry_cli.egg-info/requires.txt +0 -2
- {ryry_cli-2.19 → ryry_cli-2.21}/setup.py +1 -3
- ryry_cli-2.19/ryry/constant.py +0 -5
- {ryry_cli-2.19 → ryry_cli-2.21}/LICENSE +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/README.md +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/__init__.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/main.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/server_func.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/store.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/upload.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry/utils.py +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.19 → ryry_cli-2.21}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ryry-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.21
|
|
4
4
|
Summary: ryry tools
|
|
5
5
|
Home-page: https://github.com/dalipenMedia
|
|
6
6
|
Author: dalipen
|
|
@@ -15,7 +15,6 @@ Requires-Dist: requests
|
|
|
15
15
|
Requires-Dist: uuid
|
|
16
16
|
Requires-Dist: Image
|
|
17
17
|
Requires-Dist: pillow
|
|
18
|
-
Requires-Dist: protobuf
|
|
19
18
|
Requires-Dist: psutil
|
|
20
19
|
Requires-Dist: pynvml
|
|
21
20
|
Requires-Dist: requests_toolbelt
|
|
@@ -28,7 +27,6 @@ Requires-Dist: setuptools
|
|
|
28
27
|
Requires-Dist: twine
|
|
29
28
|
Requires-Dist: python-crontab
|
|
30
29
|
Requires-Dist: urllib3
|
|
31
|
-
Requires-Dist: requests_toolbelt
|
|
32
30
|
|
|
33
31
|
ryry Python Tool
|
|
34
32
|
===============================================
|
|
@@ -96,7 +96,7 @@ class RyryTaskExecutor(Thread):
|
|
|
96
96
|
self.is_running = False
|
|
97
97
|
print(f" {self.name} waiting stop")
|
|
98
98
|
for _ in range(self.max_counter*2):
|
|
99
|
-
self.task_queue.put([None,
|
|
99
|
+
self.task_queue.put([None, None])
|
|
100
100
|
print(f" {self.name} stop")
|
|
101
101
|
|
|
102
102
|
lock = Lock()
|
|
@@ -367,8 +367,7 @@ def widgetInstallNotify(widgetName, newver):
|
|
|
367
367
|
|
|
368
368
|
def pipReInstall(name, url):
|
|
369
369
|
if name:
|
|
370
|
-
subprocess.run(f"
|
|
371
|
-
subprocess.run(f"pip3 uninstall {name} -y", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
370
|
+
subprocess.run(f"ryry widget install {name}", stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
372
371
|
subprocess.run(f"pip install {url} -i https://pypi.python.org/simple/ --extra-index-url https://pypi.python.org/simple/",
|
|
373
372
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
|
|
374
373
|
subprocess.run(f"pip3 install {url} -i https://pypi.python.org/simple/ --extra-index-url https://pypi.python.org/simple/",
|
|
@@ -386,11 +385,13 @@ def UpdateWidgetFromPypi():
|
|
|
386
385
|
path = os.path.dirname(path)
|
|
387
386
|
if is_block == False and os.path.exists(path):
|
|
388
387
|
data = GetWidgetConfig(path)
|
|
389
|
-
if "
|
|
388
|
+
if "name" in data and len(data["name"]) > 0:
|
|
390
389
|
try:
|
|
391
|
-
py_package = data["
|
|
390
|
+
py_package = data["name"]
|
|
391
|
+
local_version = data.get("version", "")
|
|
392
392
|
widgetid, remote_version, package_url = ryry_webapi.findWidget(py_package)
|
|
393
|
-
local_version
|
|
393
|
+
if len(local_version) <= 0:
|
|
394
|
+
local_version = _local_package_version(py_package)
|
|
394
395
|
if len(local_version) <= 0:
|
|
395
396
|
continue
|
|
396
397
|
if compare_versions(remote_version, local_version) > 0:
|
|
@@ -409,7 +410,7 @@ def UpdateWidgetFromPypi():
|
|
|
409
410
|
except Exception as ex:
|
|
410
411
|
print(ex)
|
|
411
412
|
continue
|
|
412
|
-
|
|
413
|
+
|
|
413
414
|
def installWidget(name):
|
|
414
415
|
widgetid, remote_version, package_url = ryry_webapi.findWidget(name)
|
|
415
416
|
if len(widgetid) <= 0:
|
|
@@ -421,4 +422,6 @@ def installWidget(name):
|
|
|
421
422
|
pipReInstall(name, package_url)
|
|
422
423
|
widgetInstallNotify(name, remote_version)
|
|
423
424
|
addWidgetToEnv(name)
|
|
425
|
+
else:
|
|
426
|
+
print(f"本地 {local_version} 版本较高,请卸载后再安装")
|
|
424
427
|
|
|
@@ -95,8 +95,8 @@ def executeLocalPython(taskUUID, cmd, param, timeout):
|
|
|
95
95
|
o2 = error.decode(encoding="utf8", errors="ignore")
|
|
96
96
|
error_msg = f"{o1}\n{o2}"
|
|
97
97
|
short_error_msg = ""
|
|
98
|
-
if len(error_msg) >
|
|
99
|
-
short_error_msg = f"{error_msg[0:
|
|
98
|
+
if len(error_msg) > 610:
|
|
99
|
+
short_error_msg = f"{error_msg[0:300]}\n...\n{error_msg[len(error_msg)-300:]}"
|
|
100
100
|
else:
|
|
101
101
|
short_error_msg = error_msg
|
|
102
102
|
outData["message"] = short_error_msg
|
|
@@ -219,41 +219,38 @@ def notifyCounterIfNeed():
|
|
|
219
219
|
}
|
|
220
220
|
})
|
|
221
221
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
"
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
os.remove(task_counter_file)
|
|
255
|
-
except:
|
|
256
|
-
pass
|
|
222
|
+
try:
|
|
223
|
+
import matplotlib.pyplot as plt
|
|
224
|
+
plt.figure(figsize=(8,3))
|
|
225
|
+
plt.rcParams.update({
|
|
226
|
+
'font.size': 7
|
|
227
|
+
})
|
|
228
|
+
plt.bar(t_l, s_l, color='g', label='success')
|
|
229
|
+
plt.bar(t_l, f_l, bottom=s_l, color='r', label='fail')
|
|
230
|
+
plt.title(f'[{socket.gethostname()}] [{yesterday}] success/fail={s_cnt}/{f_cnt}')
|
|
231
|
+
plt.xlabel('time')
|
|
232
|
+
plt.xticks(ticks=t_l,rotation=45)
|
|
233
|
+
plt.ylabel('count')
|
|
234
|
+
plt.subplots_adjust(bottom=0.25)
|
|
235
|
+
plt.legend()
|
|
236
|
+
fff = os.path.join(os.path.dirname(os.path.abspath(__file__)), "plt.png")
|
|
237
|
+
plt.savefig(fff)
|
|
238
|
+
with open(fff, "rb") as f:
|
|
239
|
+
encode_string = str(base64.b64encode(f.read()), encoding='utf-8')
|
|
240
|
+
md5 = hashlib.md5()
|
|
241
|
+
md5.update(base64.b64decode(encode_string))
|
|
242
|
+
hash = md5.hexdigest()
|
|
243
|
+
notifyWechatRobot({
|
|
244
|
+
"msgtype": "image",
|
|
245
|
+
"image": {
|
|
246
|
+
"base64": encode_string,
|
|
247
|
+
"md5": hash
|
|
248
|
+
}
|
|
249
|
+
})
|
|
250
|
+
os.remove(fff)
|
|
251
|
+
os.remove(task_counter_file)
|
|
252
|
+
except:
|
|
253
|
+
pass
|
|
257
254
|
|
|
258
255
|
def saveCounter(taskUUID, duration, isSuccess):
|
|
259
256
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ryry-cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.21
|
|
4
4
|
Summary: ryry tools
|
|
5
5
|
Home-page: https://github.com/dalipenMedia
|
|
6
6
|
Author: dalipen
|
|
@@ -15,7 +15,6 @@ Requires-Dist: requests
|
|
|
15
15
|
Requires-Dist: uuid
|
|
16
16
|
Requires-Dist: Image
|
|
17
17
|
Requires-Dist: pillow
|
|
18
|
-
Requires-Dist: protobuf
|
|
19
18
|
Requires-Dist: psutil
|
|
20
19
|
Requires-Dist: pynvml
|
|
21
20
|
Requires-Dist: requests_toolbelt
|
|
@@ -28,7 +27,6 @@ Requires-Dist: setuptools
|
|
|
28
27
|
Requires-Dist: twine
|
|
29
28
|
Requires-Dist: python-crontab
|
|
30
29
|
Requires-Dist: urllib3
|
|
31
|
-
Requires-Dist: requests_toolbelt
|
|
32
30
|
|
|
33
31
|
ryry Python Tool
|
|
34
32
|
===============================================
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import datetime
|
|
5
5
|
|
|
6
|
-
ryry_version = "2.
|
|
6
|
+
ryry_version = "2.21"
|
|
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")
|
|
@@ -53,7 +53,6 @@ setuptools.setup(
|
|
|
53
53
|
'uuid',
|
|
54
54
|
'Image',
|
|
55
55
|
'pillow',
|
|
56
|
-
'protobuf',
|
|
57
56
|
'psutil',
|
|
58
57
|
'pynvml',
|
|
59
58
|
'requests_toolbelt',
|
|
@@ -66,7 +65,6 @@ setuptools.setup(
|
|
|
66
65
|
'twine',
|
|
67
66
|
'python-crontab',
|
|
68
67
|
'urllib3',
|
|
69
|
-
'requests_toolbelt',
|
|
70
68
|
],
|
|
71
69
|
dependency_links=[],
|
|
72
70
|
entry_points={
|
ryry_cli-2.19/ryry/constant.py
DELETED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|