mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
fix: update current_time calculation to use local timezone in cache validation
This commit is contained in:
parent
750587fe2d
commit
8a66783ff4
1 changed files with 1 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ class Job:
|
|||
try:
|
||||
cache_info = self.get_cache(name, job_name=job_name, service_id=service_id, plugin_id=plugin_id, with_info=True, with_data=False)
|
||||
if isinstance(cache_info, dict):
|
||||
current_time = datetime.now().timestamp()
|
||||
current_time = datetime.now().astimezone().timestamp()
|
||||
if current_time < cache_info["last_update"]:
|
||||
return False
|
||||
is_cached = current_time - cache_info["last_update"] < EXPIRE_TIME[expire]
|
||||
|
|
|
|||
Loading…
Reference in a new issue