mirror of
https://github.com/tubearchivist/tubearchivist
synced 2024-11-02 09:41:07 +00:00
fix next_exec epoch time builder
This commit is contained in:
parent
24b02150a7
commit
74aa134971
@ -205,12 +205,12 @@ class ElasticSnapshot:
|
|||||||
if not policy:
|
if not policy:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
next_exec = policy["next_execution_millis"]
|
next_exec = policy["next_execution_millis"] // 1000
|
||||||
next_exec_date = datetime.fromtimestamp(next_exec // 1000)
|
next_exec_date = datetime.fromtimestamp(next_exec)
|
||||||
next_exec_str = next_exec_date.strftime("%Y-%m-%d %H:%M")
|
next_exec_str = next_exec_date.strftime("%Y-%m-%d %H:%M")
|
||||||
expire_after = policy["policy"]["retention"]["expire_after"]
|
expire_after = policy["policy"]["retention"]["expire_after"]
|
||||||
policy_metadata = {
|
policy_metadata = {
|
||||||
"next_exec": next_exec_date,
|
"next_exec": next_exec,
|
||||||
"next_exec_str": next_exec_str,
|
"next_exec_str": next_exec_str,
|
||||||
"expire_after": expire_after,
|
"expire_after": expire_after,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user