mirror of
https://github.com/ceph/ceph
synced 2024-12-25 12:54:16 +00:00
Create a DateTime object from the timestamp
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
parent
5ea5018dbe
commit
48b8ba4ad2
@ -24,7 +24,8 @@ restart_file_path = '/tmp/teuthology-restart-workers'
|
||||
def need_restart():
|
||||
if not os.path.exists(restart_file_path):
|
||||
return False
|
||||
if os.path.getmtime(restart_file_path) > start_time:
|
||||
file_mtime = datetime.utcfromtimestamp(os.path.getmtime(restart_file_path))
|
||||
if file_mtime > start_time:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user