Skip to content

Commit f54f39f

Browse files
Merge pull request #59 from HPCNow/main
froster v0.12.15 - Froster configuration tests done
2 parents ba47f19 + 72f4dd7 commit f54f39f

File tree

3 files changed

+281
-17
lines changed

3 files changed

+281
-17
lines changed

Diff for: froster/froster.py

+7-9
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def __init__(self):
177177
self.aws_init = True
178178

179179
# Last timestamp we checked for an updated
180-
self.update_check_timestamp = config.get(
180+
self.last_timestamp = config.getint(
181181
'UPDATE', 'timestamp', fallback=None)
182182

183183
# Shared configuration
@@ -982,7 +982,7 @@ def set_shared(self):
982982

983983
# Ask user if they want to move the local list of files and directories that were archived to the shared directory
984984
local_froster_archives_to_shared = inquirer.confirm(
985-
message="Do you want to move the local list of files and directories that were archived to the shared directory?", default=True)
985+
message="Do you want to copy the local list of files and directories that were archived to the shared directory?", default=True)
986986

987987
# Move the local froster archives to shared directory
988988
if local_froster_archives_to_shared:
@@ -1200,20 +1200,18 @@ def check_update(self):
12001200
'''Set the update check'''
12011201

12021202
try:
1203-
timestamp = time.time()
1203+
timestamp = int(time.time())
12041204

1205-
if hasattr(self, 'update_check_timestamp') and self.update_check_timestamp is not None:
1205+
if hasattr(self, 'last_timestamp') and self.last_timestamp is not None:
12061206
# Check if last day was less than 86400 * 7 = (1 day) * 7 = 1 week
1207-
print(timestamp)
1208-
print(self.update_check_timestamp)
1209-
print(timestamp - self.update_check_timestamp)
1210-
if timestamp - self.update_check_timestamp < (86400*7):
1207+
if timestamp - self.last_timestamp < (86400*7):
12111208
# Less than a week since last check
12121209
return False
12131210

12141211
# Set the update check flag in the config file
12151212
self.__set_configuration_entry(
1216-
'UPDATE', 'update_check_timestamp', timestamp)
1213+
'UPDATE', 'timestamp', timestamp)
1214+
12171215
return True
12181216

12191217
except Exception:

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "froster"
7-
version = "0.12.14"
7+
version = "0.12.15"
88
description = "Froster is a tool for easy data transfer between local file systems and AWS S3 storage."
99
authors = ["Victor Machado <[email protected]>"]
1010
readme = "README.md"

0 commit comments

Comments
 (0)