Terarea  2
The automation project
Loading...
Searching...
No Matches
src.lib.components.crons.Crons Class Reference
Collaboration diagram for src.lib.components.crons.Crons:
Collaboration graph

Public Member Functions

None __init__ (self, RuntimeData runtime_data, int error=84, int success=0, bool debug=False)
 
None __del__ (self)
 
int inject_crons (self)
 
None clean_expired_tokens (self)
 
None clean_expired_verification_nodes (self)
 
None renew_oaths (self)
 
None check_actions (self)
 

Data Fields

int error = error
 
int success = success
 
bool debug = debug
 
RuntimeData runtime_data = runtime_data
 
Disp disp
 

Protected Member Functions

None _test_hello_world (self)
 
None _test_current_date (self, *Any args)
 
None _harass_database (self, *Any args)
 

Detailed Description

_summary_

Definition at line 11 of file crons.py.

Constructor & Destructor Documentation

◆ __init__()

None src.lib.components.crons.Crons.__init__ ( self,
RuntimeData runtime_data,
int error = 84,
int success = 0,
bool debug = False )

Definition at line 15 of file crons.py.

◆ __del__()

None src.lib.components.crons.Crons.__del__ ( self)
_summary_
    The destructor of the class

Definition at line 32 of file crons.py.

Member Function Documentation

◆ _harass_database()

None src.lib.components.crons.Crons._harass_database ( self,
*Any args )
protected
_summary_
    This is a test function that will print the current date.
Args:
    date (datetime): _description_

Definition at line 122 of file crons.py.

◆ _test_current_date()

None src.lib.components.crons.Crons._test_current_date ( self,
*Any args )
protected
_summary_
    This is a test function that will print the current date.
Args:
    date (datetime): _description_

Definition at line 101 of file crons.py.

◆ _test_hello_world()

None src.lib.components.crons.Crons._test_hello_world ( self)
protected
_summary_
    This is a test function that will print "Hello World".

Definition at line 95 of file crons.py.

◆ check_actions()

None src.lib.components.crons.Crons.check_actions ( self)
_summary_
    Function in charge of checking if any actions need to be run.

Definition at line 352 of file crons.py.

◆ clean_expired_tokens()

None src.lib.components.crons.Crons.clean_expired_tokens ( self)
_summary_
    Remove the tokens that have passed their lifespan.

Definition at line 184 of file crons.py.

◆ clean_expired_verification_nodes()

None src.lib.components.crons.Crons.clean_expired_verification_nodes ( self)
_summary_
    Remove the nodes in the verification table that have passed their lifespan.

Definition at line 227 of file crons.py.

◆ inject_crons()

int src.lib.components.crons.Crons.inject_crons ( self)
_summary_
    Add the cron functions to the cron loop.

Returns:
    int: _description_: The overall status of the injection.

Definition at line 41 of file crons.py.

◆ renew_oaths()

None src.lib.components.crons.Crons.renew_oaths ( self)
_summary_
    Function in charge of renewing the oath tokens that are about to expire.

Definition at line 272 of file crons.py.

Field Documentation

◆ debug

bool src.lib.components.crons.Crons.debug = debug

Definition at line 20 of file crons.py.

◆ disp

Disp src.lib.components.crons.Crons.disp
Initial value:
= Disp(
TOML_CONF,
SAVE_TO_FILE,
FILE_NAME,
FILE_DESCRIPTOR,
debug=self.debug,
logger=self.__class__.__name__
)

Definition at line 23 of file crons.py.

◆ error

int src.lib.components.crons.Crons.error = error

Definition at line 18 of file crons.py.

◆ runtime_data

RuntimeData src.lib.components.crons.Crons.runtime_data = runtime_data

Definition at line 21 of file crons.py.

◆ success

int src.lib.components.crons.Crons.success = success

Definition at line 19 of file crons.py.


The documentation for this class was generated from the following file: