[arch][snap] improvement -> caching categories file for 24 hours

This commit is contained in:
Vinicius Moreira
2020-12-28 10:41:54 -03:00
parent 487f019573
commit 01bd532465
36 changed files with 226 additions and 83 deletions

View File

@@ -30,3 +30,8 @@ def size_to_byte(size: float, unit: str) -> int:
def datetime_as_milis(date: datetime = datetime.utcnow()) -> int:
return int(round(date.timestamp() * 1000))
def map_timestamp_file(file_path: str) -> str:
path_split = file_path.split('/')
return '/'.join(path_split[0:-1]) + '/' + path_split[-1].split('.')[0] + '.ts'