easy-utils-dev 2.170__tar.gz → 2.172__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.
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/PKG-INFO +1 -1
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/debugger.py +8 -7
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/uiserver.py +2 -1
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/utils.py +24 -16
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev.egg-info/PKG-INFO +1 -1
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/setup.py +1 -1
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/MANIFEST.in +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/EasySsh.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/Events.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/FastQueue.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/NameObject.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/__init__.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/abortable.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/brevosmtp.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/check_license.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/cplib.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/custom_env.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/easy_oracle.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/encryptor.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/ept.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/ept_sql/create_dirs.sql +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/ept_sql/create_ept_tables.sql +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/exceptions.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/filescompressor.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/generate_license.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/keycloakapi.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/lralib.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/ne1830PSS.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/nsp_kafka.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/openid_server.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/optics_utils.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/require_auth.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/simple_sqlite.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/temp_memory.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/winserviceapi.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/wsnoclib.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev/wsselib.py +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev.egg-info/SOURCES.txt +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev.egg-info/dependency_links.txt +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev.egg-info/requires.txt +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/easy_utils_dev.egg-info/top_level.txt +0 -0
- {easy_utils_dev-2.170 → easy_utils_dev-2.172}/setup.cfg +0 -0
|
@@ -331,13 +331,14 @@ class DEBUGGER:
|
|
|
331
331
|
|
|
332
332
|
def changeHomePath( self , path ) :
|
|
333
333
|
def delet_later(lastAbsoluteHomePath) :
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
334
|
+
...
|
|
335
|
+
# if lastAbsoluteHomePath :
|
|
336
|
+
# sleep(1)
|
|
337
|
+
# try :
|
|
338
|
+
# shutil.rmtree(lastAbsoluteHomePath)
|
|
339
|
+
# except :
|
|
340
|
+
# pass
|
|
341
|
+
# start_thread(target=delet_later, args=[self.lastAbsoluteHomePath])
|
|
341
342
|
sleep(.5)
|
|
342
343
|
self.create_log_path( path , self.filename)
|
|
343
344
|
self.file_handler_class = self.createRotateFileHandler(self.log_path_with_filename)
|
|
@@ -286,7 +286,7 @@ class UISERVER :
|
|
|
286
286
|
self.Response = Response(self.socketio , request )
|
|
287
287
|
if not self.logger :
|
|
288
288
|
self.logger = DEBUGGER(
|
|
289
|
-
name='
|
|
289
|
+
name='webserver',
|
|
290
290
|
homePath=TMP_PATH
|
|
291
291
|
)
|
|
292
292
|
self.start_before_request()
|
|
@@ -343,6 +343,7 @@ class UISERVER :
|
|
|
343
343
|
return self.socketio_rooms[room_id]
|
|
344
344
|
|
|
345
345
|
def start_before_request(self) :
|
|
346
|
+
self.logger.info("uiserver.prerequest.jobs initialization has started ...")
|
|
346
347
|
|
|
347
348
|
@self.app.route(f'{self.abort_base_url}/<id>' , methods=['DELETE'])
|
|
348
349
|
def abort_request(id : str ) :
|
|
@@ -137,28 +137,36 @@ def generateToken(iter=5,split=False) :
|
|
|
137
137
|
return ''.join( [ getRandomKeysAndStr(n=5) for x in range( iter )] )
|
|
138
138
|
return '-'.join( [ getRandomKeysAndStr(n=5) for x in range( iter )] )
|
|
139
139
|
|
|
140
|
-
|
|
141
|
-
def pingAddress( address ) :
|
|
140
|
+
def pingAddress(address, retries=1 , timeout=2):
|
|
142
141
|
"""
|
|
143
142
|
Check if a network address is reachable.
|
|
144
|
-
|
|
143
|
+
|
|
145
144
|
Args:
|
|
146
145
|
address (str): IP address or hostname to ping.
|
|
147
|
-
|
|
146
|
+
retries (int): Number of attempts.
|
|
147
|
+
|
|
148
148
|
Returns:
|
|
149
|
-
bool: True if
|
|
149
|
+
bool: True if reachable, False otherwise.
|
|
150
150
|
"""
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
151
|
+
if address in ('127.0.0.1', 'localhost'):
|
|
152
|
+
return True
|
|
153
|
+
|
|
154
|
+
for _ in range(retries):
|
|
155
|
+
try:
|
|
156
|
+
if ping3.ping(address , timeout=timeout ):
|
|
157
|
+
return True
|
|
158
|
+
except Exception:
|
|
159
|
+
pass
|
|
160
|
+
|
|
161
|
+
return False
|
|
162
|
+
|
|
163
|
+
def ping_address_cmd( address , n=5 ) :
|
|
164
|
+
from subprocess import getoutput
|
|
165
|
+
if 'linux' in sys.platform :
|
|
166
|
+
output = getoutput(f"ping -c {n} {address}")
|
|
167
|
+
else :
|
|
168
|
+
output = getoutput(f"ping -n {n} {address}")
|
|
169
|
+
return output
|
|
162
170
|
|
|
163
171
|
def getScriptDir(f= __file__):
|
|
164
172
|
"""
|
|
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
|
|
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
|