machineconfig 6.75__py3-none-any.whl → 6.76__py3-none-any.whl
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 machineconfig might be problematic. Click here for more details.
- machineconfig/utils/scheduler.py +2 -2
- {machineconfig-6.75.dist-info → machineconfig-6.76.dist-info}/METADATA +1 -1
- {machineconfig-6.75.dist-info → machineconfig-6.76.dist-info}/RECORD +6 -6
- {machineconfig-6.75.dist-info → machineconfig-6.76.dist-info}/WHEEL +0 -0
- {machineconfig-6.75.dist-info → machineconfig-6.76.dist-info}/entry_points.txt +0 -0
- {machineconfig-6.75.dist-info → machineconfig-6.76.dist-info}/top_level.txt +0 -0
machineconfig/utils/scheduler.py
CHANGED
|
@@ -160,7 +160,7 @@ class CacheMemory[T]():
|
|
|
160
160
|
self.logger = logger
|
|
161
161
|
self.expire = expire
|
|
162
162
|
self.name = name if isinstance(name, str) else self.source_func.__name__
|
|
163
|
-
def __call__(self, fresh: bool, tolerance_seconds: int) -> T:
|
|
163
|
+
def __call__(self, fresh: bool, tolerance_seconds: float | int) -> T:
|
|
164
164
|
if fresh or not hasattr(self, "cache"):
|
|
165
165
|
why = "There was an explicit fresh order." if fresh else "Previous cache never existed."
|
|
166
166
|
t0 = time.time()
|
|
@@ -210,7 +210,7 @@ class Cache[T](): # This class helps to accelrate access to latest data coming
|
|
|
210
210
|
self.logger = logger
|
|
211
211
|
self.expire = expire
|
|
212
212
|
self.name = name if isinstance(name, str) else self.source_func.__name__
|
|
213
|
-
def __call__(self, fresh: bool, tolerance_seconds: int) -> T:
|
|
213
|
+
def __call__(self, fresh: bool, tolerance_seconds: float | int) -> T:
|
|
214
214
|
if not hasattr(self, "cache"): # populate cache for the first time: we have two options, populate from disk or from source func.
|
|
215
215
|
if self.path.exists(): # prefer to read from disk over source func as a default source of cache.
|
|
216
216
|
age = datetime.now() - datetime.fromtimestamp(self.path.stat().st_mtime)
|
|
@@ -406,7 +406,7 @@ machineconfig/utils/options.py,sha256=vUO4Kej-vDOv64wHr2HNDyu6PATURpjd7xp6N8OOoJ
|
|
|
406
406
|
machineconfig/utils/path_extended.py,sha256=WyJwoHnXdvSQQJ-yrxTX78FpqYmgVeKDYpNEB9UsRck,53223
|
|
407
407
|
machineconfig/utils/path_helper.py,sha256=0e3Xh3BAEv27oqcezNeVLHJllGmLEgLH4T1l90m-650,8014
|
|
408
408
|
machineconfig/utils/procs.py,sha256=YPA_vEYQGwPd_o_Lc6nOTBo5BrB1tSs8PJ42XiGpenM,10957
|
|
409
|
-
machineconfig/utils/scheduler.py,sha256=
|
|
409
|
+
machineconfig/utils/scheduler.py,sha256=fguwvINyaupOxdU5Uadyxalh_jXTXDzt0ioEgjEOKcM,14705
|
|
410
410
|
machineconfig/utils/scheduling.py,sha256=6x5zLA7sY5gohrEtN6zGrXIqNFasMoyBfwLcOjrjiME,11109
|
|
411
411
|
machineconfig/utils/source_of_truth.py,sha256=ZAnCRltiM07ig--P6g9_6nEAvNFC4X4ERFTVcvpIYsE,764
|
|
412
412
|
machineconfig/utils/ssh.py,sha256=aGUHg1qgaqA3JNQwWfESN6q95K8fVwJ66XAKfq-yyz0,38991
|
|
@@ -438,8 +438,8 @@ machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoS
|
|
|
438
438
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
439
439
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
440
440
|
machineconfig/utils/ssh_utils/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
441
|
-
machineconfig-6.
|
|
442
|
-
machineconfig-6.
|
|
443
|
-
machineconfig-6.
|
|
444
|
-
machineconfig-6.
|
|
445
|
-
machineconfig-6.
|
|
441
|
+
machineconfig-6.76.dist-info/METADATA,sha256=OUQm1D3ot2YtaNmTkMw8LKqVxVa-N1AzhluBoS8cRmU,2928
|
|
442
|
+
machineconfig-6.76.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
443
|
+
machineconfig-6.76.dist-info/entry_points.txt,sha256=NTW7hbUlpt5Vx9DdQrONLkYMCuBXpvYh1dt0AtlGxeI,466
|
|
444
|
+
machineconfig-6.76.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
445
|
+
machineconfig-6.76.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|