easy-utils-dev 2.147__tar.gz → 2.149__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.

Potentially problematic release.


This version of easy-utils-dev might be problematic. Click here for more details.

Files changed (43) hide show
  1. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/PKG-INFO +1 -1
  2. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/debugger.py +29 -10
  3. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/uiserver.py +0 -2
  4. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/wsnoclib.py +5 -4
  5. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev.egg-info/PKG-INFO +1 -1
  6. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/setup.py +1 -1
  7. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/MANIFEST.in +0 -0
  8. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/EasySsh.py +0 -0
  9. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/Events.py +0 -0
  10. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/FastQueue.py +0 -0
  11. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/NameObject.py +0 -0
  12. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/__init__.py +0 -0
  13. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/abortable.py +0 -0
  14. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/brevosmtp.py +0 -0
  15. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/check_license.py +0 -0
  16. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/cplib.py +0 -0
  17. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/custom_env.py +0 -0
  18. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/debugger-C-PF4PAMMP.py +0 -0
  19. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/easy_oracle.py +0 -0
  20. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/encryptor.py +0 -0
  21. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/ept.py +0 -0
  22. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/ept_sql/create_dirs.sql +0 -0
  23. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/ept_sql/create_ept_tables.sql +0 -0
  24. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/exceptions.py +0 -0
  25. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/filescompressor.py +0 -0
  26. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/generate_license.py +0 -0
  27. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/keycloakapi.py +0 -0
  28. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/lralib.py +0 -0
  29. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/ne1830PSS.py +0 -0
  30. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/nsp_kafka.py +0 -0
  31. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/openid_server.py +0 -0
  32. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/optics_utils.py +0 -0
  33. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/require_auth.py +0 -0
  34. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/simple_sqlite.py +0 -0
  35. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/temp_memory.py +0 -0
  36. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/utils.py +0 -0
  37. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/winserviceapi.py +0 -0
  38. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev/wsselib.py +0 -0
  39. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev.egg-info/SOURCES.txt +0 -0
  40. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev.egg-info/dependency_links.txt +0 -0
  41. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev.egg-info/requires.txt +0 -0
  42. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/easy_utils_dev.egg-info/top_level.txt +0 -0
  43. {easy_utils_dev-2.147 → easy_utils_dev-2.149}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easy_utils_dev
3
- Version: 2.147
3
+ Version: 2.149
4
4
  Keywords: python3
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Dist: psutil
@@ -118,6 +118,21 @@ class DEBUGGER:
118
118
  self.set_level(EASY_UTILS_DEBUG_LEVEL)
119
119
  if os.environ.get("EASY_UTILS_ENABLE_PRINT" , '' ).lower() == 'true' :
120
120
  self.enable_print()
121
+ start_thread(target=self.checks_in_bg)
122
+
123
+
124
+ def fix_file_not_found_file_rotation(self) :
125
+ for i in range(self.BACKUP_COUNT) :
126
+ try :
127
+ file_path = self.homePath + f'.{i}'
128
+ # print(f"Checking log file path : {file_path}")
129
+ if not os.path.exists(file_path) :
130
+ with open(file_path, 'a+') as f :
131
+ print(f"Creating log file path : {file_path}")
132
+ f.write('')
133
+ except :
134
+ pass
135
+
121
136
 
122
137
  def switch_full_syntax(self , toggle) :
123
138
  if toggle :
@@ -237,6 +252,7 @@ class DEBUGGER:
237
252
 
238
253
  def checks_in_bg(self) :
239
254
  while True :
255
+ self.fix_file_not_found_file_rotation()
240
256
  if self.env.get('GLOBAL_DEBUGGER_STREAM_SERVICE') :
241
257
  self.addStreamService(socketio=self.env.get('GLOBAL_DEBUGGER_STREAM_SERVICE'))
242
258
  if self.env.get('debugger_global_level' , None) :
@@ -349,16 +365,19 @@ class DEBUGGER:
349
365
  if self.isStreamServiceAvailable() :
350
366
  d = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
351
367
  streamUrl = self.getStreamServiceUrlPath()
352
- self.stream_service.emit( streamUrl , {
353
- 'message' : message ,
354
- 'level' : level ,
355
- 'msg' : message,
356
- 'date' : d ,
357
- 'id' : self.id,
358
- 'formate' : 'json' ,
359
- 'source' : self.name ,
360
- 'getTimestamp' : getTimestamp()
361
- })
368
+ try :
369
+ self.stream_service.emit( streamUrl , {
370
+ 'message' : message ,
371
+ 'level' : level ,
372
+ 'msg' : message,
373
+ 'date' : d ,
374
+ 'id' : self.id,
375
+ 'formate' : 'json' ,
376
+ 'source' : self.name ,
377
+ 'getTimestamp' : getTimestamp()
378
+ })
379
+ except :
380
+ pass
362
381
  try :
363
382
  t= Thread(target=__call_thread__)
364
383
  # t.daemon=True
@@ -1,7 +1,5 @@
1
- import copy
2
1
  import gc
3
2
  import time
4
- from tkinter import NO
5
3
  from werkzeug.serving import ThreadedWSGIServer
6
4
  from easy_utils_dev.utils import getRandomKey , generateToken , getTimestamp
7
5
  from flask_socketio import SocketIO
@@ -1,4 +1,3 @@
1
- from tkinter import NO
2
1
  from easy_utils_dev.debugger import DEBUGGER
3
2
  import requests , json , subprocess
4
3
  from requests.auth import HTTPBasicAuth as BAuth
@@ -87,6 +86,7 @@ class WSNOCLIB :
87
86
  self.current_requests = 0
88
87
  self.connected = False
89
88
  self.pm_hadoop = PmHadoopClient(self)
89
+ self.verify_connection_by_ping = True
90
90
  if register_atexit :
91
91
  atexit.register(self.goodbye)
92
92
 
@@ -130,8 +130,9 @@ class WSNOCLIB :
130
130
  self.logger.debug(f"loggedOut flag is {self.loggedOut}")
131
131
  if self.loggedOut :
132
132
  return
133
- if not pingAddress(self.address) :
134
- raise Exception(f'Address {self.address} is not pingable.')
133
+ if self.verify_connection_by_ping :
134
+ if not pingAddress(self.address) :
135
+ raise Exception(f'Address {self.address} is not pingable.')
135
136
  # self.logger.info(f'Connecting to {self.address} using username: {self.username}')
136
137
  self.logger.debug(f'Connecting to {self.address} using username: {self.username}')
137
138
  URL = f"https://{self.address}/rest-gateway/rest/api/v1/auth/token"
@@ -379,7 +380,7 @@ class WSNOCLIB :
379
380
  return self.kafka
380
381
 
381
382
  def change_kafka_refresh_period(self , period : int =3000) :
382
- self.logger.warning('Deprecated, Kafka refresh period is now managed by WSNOC API SLEEP PERIOD. Nothing is applied now.')
383
+ self.logger.warning('Deprecated, Kafka refresh period is now managed by WSNOC API SLEEP PERIOD. Nothing is applied from this function.')
383
384
 
384
385
  def renewSubscription(self) :
385
386
  self.logger.info('Renewing subscription ...')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easy_utils_dev
3
- Version: 2.147
3
+ Version: 2.149
4
4
  Keywords: python3
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Requires-Dist: psutil
@@ -1,6 +1,6 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
- VERSION = '2.147'
3
+ VERSION = '2.149'
4
4
 
5
5
  # Setting up
6
6
  setup(
File without changes