import time
from typing import Any, Callable, List, Optional, Set, Tuple
-import datetime_utils
+from pyutils.datetimes import datetime_utils
-import constants
+import kiosk_constants
import trigger
filenames = []
pages = [
f
- for f in os.listdir(constants.pages_dir)
- if os.path.isfile(os.path.join(constants.pages_dir, f))
+ for f in os.listdir(kiosk_constants.pages_dir)
+ if os.path.isfile(os.path.join(kiosk_constants.pages_dir, f))
]
for page in pages:
result = re.match(valid_filename, page)
if result.group(3) != "none":
freshness_requirement = int(result.group(3))
last_modified = int(
- os.path.getmtime(os.path.join(constants.pages_dir, page))
+ os.path.getmtime(os.path.join(kiosk_constants.pages_dir, page))
)
age = now - last_modified
if age > freshness_requirement: