ryry-cli 2.32__tar.gz → 2.34__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.32 → ryry_cli-2.34}/PKG-INFO +1 -1
- ryry_cli-2.34/ryry/constant.py +5 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/ryry_server_socket.py +4 -4
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/task.py +3 -1
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/upload.py +6 -5
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry_cli.egg-info/PKG-INFO +1 -1
- {ryry_cli-2.32 → ryry_cli-2.34}/setup.py +1 -1
- ryry_cli-2.32/ryry/constant.py +0 -5
- {ryry_cli-2.32 → ryry_cli-2.34}/LICENSE +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/README.md +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/__init__.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/main.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/ryry_widget.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/server_func.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/store.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/taskUtils.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry/utils.py +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.32 → ryry_cli-2.34}/setup.cfg +0 -0
|
@@ -56,7 +56,6 @@ class RyryTaskExecutor(Thread):
|
|
|
56
56
|
if data is None:
|
|
57
57
|
break
|
|
58
58
|
try:
|
|
59
|
-
print(f"======= get data = {data}")
|
|
60
59
|
taskUUID = data["taskUUID"]
|
|
61
60
|
domain = ""
|
|
62
61
|
params_tmp = json.loads(data["data"])
|
|
@@ -85,10 +84,8 @@ class RyryTaskExecutor(Thread):
|
|
|
85
84
|
print(f" {current_thread().name} taskRunning stop")
|
|
86
85
|
|
|
87
86
|
def run(self):
|
|
88
|
-
idx
|
|
89
|
-
for _ in range(0, self.max_counter):
|
|
87
|
+
for idx in range(0, self.max_counter):
|
|
90
88
|
self.THEADING_LIST.append(Thread(name=f"exector-{idx}",target=self.taskRunning))
|
|
91
|
-
idx+=1
|
|
92
89
|
for t in self.THEADING_LIST:
|
|
93
90
|
t.start()
|
|
94
91
|
while self.is_running:
|
|
@@ -181,6 +178,9 @@ class RyryShortConnectThread(Thread):
|
|
|
181
178
|
|
|
182
179
|
while (self.is_running):
|
|
183
180
|
try:
|
|
181
|
+
if self.executor.idlePower() == 0:
|
|
182
|
+
time.sleep(1)
|
|
183
|
+
continue
|
|
184
184
|
datas = ryry_webapi.GetTask()
|
|
185
185
|
for it in datas:
|
|
186
186
|
self.executor.appendTask(it, self.taskCallback)
|
|
@@ -52,6 +52,8 @@ def cmdWithWidget(widget_id):
|
|
|
52
52
|
def cmdWithWidgetName(name):
|
|
53
53
|
map = store.widgetMap()
|
|
54
54
|
for widget_id in map.keys():
|
|
55
|
+
if "name" not in map[widget_id]:
|
|
56
|
+
continue
|
|
55
57
|
if map[widget_id]["name"] == name and map[widget_id]["isBlock"] == False:
|
|
56
58
|
is_block = map[widget_id]["isBlock"]
|
|
57
59
|
return map[widget_id]["path"]
|
|
@@ -142,7 +144,7 @@ def updateProgress(data, progress=50, taskUUID=None):
|
|
|
142
144
|
progress = 0
|
|
143
145
|
if progress > 100:
|
|
144
146
|
progress = 100
|
|
145
|
-
if realTaskUUID.startswith("local_") == False:
|
|
147
|
+
if realTaskUUID and realTaskUUID.startswith("local_") == False:
|
|
146
148
|
return ryry_webapi.TaskUpdateProgress(realTaskUUID, progress, json.dumps(data))
|
|
147
149
|
|
|
148
150
|
def timeout_killprocess(proc, timeout): # """超过指定的秒数后杀死进程"""
|
|
@@ -95,7 +95,7 @@ def ftpUpload(file, new_file_name, subdomain):
|
|
|
95
95
|
writepath = subdomain["writepath"]
|
|
96
96
|
readpath = subdomain["readpath"]
|
|
97
97
|
import ftplib
|
|
98
|
-
ftp = ftplib.FTP(ip)
|
|
98
|
+
ftp = ftplib.FTP(ip, timeout=3)
|
|
99
99
|
ftp.login(username, password)
|
|
100
100
|
|
|
101
101
|
s = deepFtpUpload(file, new_file_name, ftp, writepath, readpath)
|
|
@@ -105,7 +105,7 @@ def ftpUpload(file, new_file_name, subdomain):
|
|
|
105
105
|
def _can_connect_ftp(ip, username, password, writepath):
|
|
106
106
|
import ftplib
|
|
107
107
|
try:
|
|
108
|
-
ftp = ftplib.FTP(ip)
|
|
108
|
+
ftp = ftplib.FTP(ip, timeout=3)
|
|
109
109
|
ftp.login(username, password)
|
|
110
110
|
try:
|
|
111
111
|
ftp.cwd(writepath)
|
|
@@ -141,8 +141,9 @@ def getSubdomain(targetDomain):
|
|
|
141
141
|
if len(targetDomain) <= 0:
|
|
142
142
|
return None
|
|
143
143
|
for ip in SUBDOMAIN.keys():
|
|
144
|
-
if
|
|
145
|
-
|
|
144
|
+
if targetDomain == SUBDOMAIN[ip]["readpath"]:
|
|
145
|
+
if _can_connect_ftp(ip, SUBDOMAIN[ip]["username"], SUBDOMAIN[ip]["password"], SUBDOMAIN[ip]["writepath"]):
|
|
146
|
+
return SUBDOMAIN[ip]
|
|
146
147
|
return None
|
|
147
148
|
|
|
148
149
|
def getFirstSupportSubdomain():
|
|
@@ -172,7 +173,7 @@ def download(url, saveDir):
|
|
|
172
173
|
password = SUBDOMAIN[host]["password"]
|
|
173
174
|
writepath = SUBDOMAIN[host]["writepath"]
|
|
174
175
|
readpath = SUBDOMAIN[host]["readpath"]
|
|
175
|
-
ftp = ftplib.FTP(ip)
|
|
176
|
+
ftp = ftplib.FTP(ip, timeout=3)
|
|
176
177
|
ftp.login(username, password)
|
|
177
178
|
|
|
178
179
|
remote_filepath = parsed_url.path[1:]
|
|
@@ -3,7 +3,7 @@ import os
|
|
|
3
3
|
import subprocess
|
|
4
4
|
import datetime
|
|
5
5
|
|
|
6
|
-
ryry_version = "2.
|
|
6
|
+
ryry_version = "2.34"
|
|
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")
|
ryry_cli-2.32/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
|
|
File without changes
|
|
File without changes
|