ryry-cli 2.74__tar.gz → 2.76__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.74 → ryry_cli-2.76}/PKG-INFO +1 -1
- ryry_cli-2.76/ryry/constant.py +4 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/taskUtils.py +35 -32
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/upload.py +2 -2
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry_cli.egg-info/PKG-INFO +1 -1
- {ryry_cli-2.74 → ryry_cli-2.76}/setup.py +1 -1
- ryry_cli-2.74/ryry/constant.py +0 -4
- {ryry_cli-2.74 → ryry_cli-2.76}/LICENSE +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/README.md +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/__init__.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/main.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/ryry_server_socket.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/ryry_service.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/ryry_webapi.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/ryry_widget.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/script_template/__init__.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/script_template/main.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/script_template/run.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/server_func.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/store.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/task.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry/utils.py +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry_cli.egg-info/SOURCES.txt +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry_cli.egg-info/dependency_links.txt +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry_cli.egg-info/entry_points.txt +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry_cli.egg-info/requires.txt +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/ryry_cli.egg-info/top_level.txt +0 -0
- {ryry_cli-2.74 → ryry_cli-2.76}/setup.cfg +0 -0
|
@@ -240,38 +240,41 @@ def notifyCounterIfNeed():
|
|
|
240
240
|
}
|
|
241
241
|
})
|
|
242
242
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
"
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
243
|
+
import subprocess, platform
|
|
244
|
+
#darwin Command Line cannot create pyplot gui because not application with gui
|
|
245
|
+
if platform.system() != 'Darwin':
|
|
246
|
+
try:
|
|
247
|
+
import matplotlib.pyplot as plt
|
|
248
|
+
plt.figure(figsize=(8,3))
|
|
249
|
+
plt.rcParams.update({
|
|
250
|
+
'font.size': 7
|
|
251
|
+
})
|
|
252
|
+
plt.bar(t_l, s_l, color='g', label='success')
|
|
253
|
+
plt.bar(t_l, f_l, bottom=s_l, color='r', label='fail')
|
|
254
|
+
plt.title(f'[{socket.gethostname()}] [{yesterday}] success/fail={s_cnt}/{f_cnt}')
|
|
255
|
+
plt.xlabel('time')
|
|
256
|
+
plt.xticks(ticks=t_l,rotation=45)
|
|
257
|
+
plt.ylabel('count')
|
|
258
|
+
plt.subplots_adjust(bottom=0.25)
|
|
259
|
+
plt.legend()
|
|
260
|
+
fff = os.path.join(os.path.dirname(os.path.abspath(__file__)), "plt.png")
|
|
261
|
+
plt.savefig(fff)
|
|
262
|
+
with open(fff, "rb") as f:
|
|
263
|
+
encode_string = str(base64.b64encode(f.read()), encoding='utf-8')
|
|
264
|
+
md5 = hashlib.md5()
|
|
265
|
+
md5.update(base64.b64decode(encode_string))
|
|
266
|
+
hash = md5.hexdigest()
|
|
267
|
+
notifyWechatRobot({
|
|
268
|
+
"msgtype": "image",
|
|
269
|
+
"image": {
|
|
270
|
+
"base64": encode_string,
|
|
271
|
+
"md5": hash
|
|
272
|
+
}
|
|
273
|
+
})
|
|
274
|
+
os.remove(fff)
|
|
275
|
+
os.remove(task_counter_file)
|
|
276
|
+
except:
|
|
277
|
+
pass
|
|
275
278
|
|
|
276
279
|
def saveCounter(taskUUID, duration, isSuccess):
|
|
277
280
|
try:
|
|
@@ -155,14 +155,14 @@ def getSubdomain(targetDomain):
|
|
|
155
155
|
for ip in SUBDOMAIN.keys():
|
|
156
156
|
for host_item in SUBDOMAIN[ip]:
|
|
157
157
|
if targetDomain == host_item["readpath"]:
|
|
158
|
-
if _can_connect_ftp(ip, host_item["
|
|
158
|
+
if _can_connect_ftp(ip, host_item["port"], host_item["username"], host_item["password"], host_item["writepath"]):
|
|
159
159
|
return host_item
|
|
160
160
|
return None
|
|
161
161
|
|
|
162
162
|
def getFirstSupportSubdomain():
|
|
163
163
|
for ip in SUBDOMAIN.keys():
|
|
164
164
|
for host_item in SUBDOMAIN[ip]:
|
|
165
|
-
if _can_connect_ftp(ip, host_item["
|
|
165
|
+
if _can_connect_ftp(ip, host_item["port"], host_item["username"], host_item["password"], host_item["writepath"]):
|
|
166
166
|
return host_item
|
|
167
167
|
return None
|
|
168
168
|
|
ryry_cli-2.74/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
|
|
File without changes
|