cfg.add_argument(
'--arper_cache_max_staleness',
type=argparse_utils.valid_duration,
- default=datetime.timedelta(seconds=60 * 15),
+ default=datetime.timedelta(seconds=60 * 30),
metavar='DURATION',
help='Max acceptable age of the kernel arp table cache',
)
"""Universal constants."""
+from typing import Final
+
# This module is commonly used by others in here and should avoid
# taking any unnecessary dependencies back on them.
# Date/time based constants
-SECONDS_PER_MINUTE = 60
-SECONDS_PER_HOUR = 60 * SECONDS_PER_MINUTE
-SECONDS_PER_DAY = 24 * SECONDS_PER_HOUR
-SECONDS_PER_WEEK = 7 * SECONDS_PER_DAY
-MINUTES_PER_HOUR = 60
-MINUTES_PER_DAY = 24 * MINUTES_PER_HOUR
-MINUTES_PER_WEEK = 7 * MINUTES_PER_DAY
-HOURS_PER_DAY = 24
-HOURS_PER_WEEK = 7 * HOURS_PER_DAY
-DAYS_PER_WEEK = 7
-DATETIME_WEEKDAY_MONDAY = 0
-DATETIME_WEEKDAY_TUEDAY = 0
-DATETIME_WEEKDAY_WEDNESDAY = 0
-DATETIME_WEEKDAY_THURSDAY = 0
-DATETIME_WEEKDAY_FRIDAY = 0
-DATETIME_WEEKDAY_SATURDAY = 0
-DATETIME_WEEKDAY_SUNDAY = 0
+SECONDS_PER_MINUTE: Final = 60
+SECONDS_PER_HOUR: Final = 60 * SECONDS_PER_MINUTE
+SECONDS_PER_DAY: Final = 24 * SECONDS_PER_HOUR
+SECONDS_PER_WEEK: Final = 7 * SECONDS_PER_DAY
+MINUTES_PER_HOUR: Final = 60
+MINUTES_PER_DAY: Final = 24 * MINUTES_PER_HOUR
+MINUTES_PER_WEEK: Final = 7 * MINUTES_PER_DAY
+HOURS_PER_DAY: Final = 24
+HOURS_PER_WEEK: Final = 7 * HOURS_PER_DAY
+DAYS_PER_WEEK: Final = 7