Cat Feeder  1.0.0
The Cat feeder project
Loading...
Searching...
No Matches
crons_constants.py
Go to the documentation of this file.
1r"""
2# +==== BEGIN CatFeeder =================+
3# LOGO:
4# ..............(..../\
5# ...............)..(.')
6# ..............(../..)
7# ...............\‍(__)|
8# Inspired by Joan Stark
9# source https://www.asciiart.eu/
10# animals/cats
11# /STOP
12# PROJECT: CatFeeder
13# FILE: crons_constants.py
14# CREATION DATE: 19-11-2025
15# LAST Modified: 18:43:54 31-01-2026
16# DESCRIPTION:
17# This is the backend server in charge of making the actual website work.
18# /STOP
19# COPYRIGHT: (c) Cat Feeder
20# PURPOSE: The constants used for the cron library.
21# // AR
22# +==== END CatFeeder =================+
23"""
24
25from display_tty import Disp, initialise_logger
26
27from ..config import TOMLLoader
28
29IDISP: Disp = initialise_logger("Crons Constants", False)
30
31# The TOML instance in charge of loading the toml config file
32TOML = TOMLLoader()
33
34# TOML variables
35# |- Cron settings
36CLEAN_TOKENS = TOML.get_toml_variable("Crons", "clean_tokens", True)
37CLEAN_TOKENS_INTERVAL = int(TOML.get_toml_variable(
38 "Crons", "clean_tokens_interval", 1800
39))
40ENABLE_TEST_CRONS = TOML.get_toml_variable(
41 "Crons", "enable_test_crons", False
42)
43TEST_CRONS_INTERVAL = int(TOML.get_toml_variable(
44 "Crons", "test_cron_interval", 200
45))
46CHECK_ACTIONS_INTERVAL = int(TOML.get_toml_variable(
47 "Crons", "check_actions_interval", 300
48))
49CLEAN_VERIFICATION = TOML.get_toml_variable(
50 "Crons", "clean_verification", True
51)
52CLEAN_VERIFICATION_INTERVAL = TOML.get_toml_variable(
53 "Crons", "clean_verification_interval", 900
54)
55RENEW_OATH_TOKENS = TOML.get_toml_variable(
56 "Crons", "renew_oath_tokens", True
57)
58RENEW_OATH_TOKENS_INTERVAL = TOML.get_toml_variable(
59 "Crons", "renew_oath_tokens_interval", 1800
60)
61RESET_FOOD_COUNTERS_INTERVAL = TOML.get_toml_variable(
62 "Crons", "reset_food_counters_interval", 86400
63)