Cat Feeder  1.0.0
The Cat feeder project
Loading...
Searching...
No Matches
backend.src.libs.crons.background_tasks Namespace Reference

Data Structures

class  BackgroundTasks
 

Functions

None test_current_date (*Any args)
 
None hello_world ()
 
None pending_world ()
 
None goodbye_world ()
 

Variables

int SUCCES = 0
 
int ERROR = 84
 
bool DEBUG = True
 
bool KIND_KILL = True
 
int NB_REPEATS = 2
 
str TRIGGER = "interval"
 
int SECONDS = 2
 
int NB_FUNCTIONS = 5
 
 MAIN_THREAD_DELAY = int((SECONDS*NB_FUNCTIONS)*NB_REPEATS)
 
 BTI
 
 status
 

Detailed Description

# +==== BEGIN CatFeeder =================+
# LOGO:
# ..............(..../\
# ...............)..(.')
# ..............(../..)
# ...............\‍(__)|
# Inspired by Joan Stark
# source https://www.asciiart.eu/
# animals/cats
# /STOP
# PROJECT: CatFeeder
# FILE: background_tasks.py
# CREATION DATE: 11-10-2025
# LAST Modified: 14:43:26 19-12-2025
# DESCRIPTION:
# This is the backend server in charge of making the actual website work.
# /STOP
# COPYRIGHT: (c) Cat Feeder
# PURPOSE: File in charge of setting up the cron jobs for the server.
# // AR
# +==== END CatFeeder =================+

Function Documentation

◆ goodbye_world()

None backend.src.libs.crons.background_tasks.goodbye_world ( )
_summary_
    This is a test function that will print "Goodbye, World!"

Definition at line 408 of file background_tasks.py.

◆ hello_world()

None backend.src.libs.crons.background_tasks.hello_world ( )
_summary_
    This is a test function that will print "Hello, World!"

Definition at line 396 of file background_tasks.py.

◆ pending_world()

None backend.src.libs.crons.background_tasks.pending_world ( )
_summary_
    This is a test function that will print "Pending, World!"

Definition at line 402 of file background_tasks.py.

◆ test_current_date()

None backend.src.libs.crons.background_tasks.test_current_date ( *Any args)
_summary_
    This is a test function that will print the current date.
Args:
    date (datetime): _description_

Definition at line 381 of file background_tasks.py.

Variable Documentation

◆ BTI

backend.src.libs.crons.background_tasks.BTI
Initial value:
1= BackgroundTasks(
2 success=SUCCES,
3 error=ERROR,
4 debug=DEBUG
5 )

Definition at line 441 of file background_tasks.py.

◆ DEBUG

bool backend.src.libs.crons.background_tasks.DEBUG = True

Definition at line 423 of file background_tasks.py.

◆ ERROR

int backend.src.libs.crons.background_tasks.ERROR = 84

Definition at line 422 of file background_tasks.py.

◆ KIND_KILL

bool backend.src.libs.crons.background_tasks.KIND_KILL = True

Definition at line 424 of file background_tasks.py.

◆ MAIN_THREAD_DELAY

backend.src.libs.crons.background_tasks.MAIN_THREAD_DELAY = int((SECONDS*NB_FUNCTIONS)*NB_REPEATS)

Definition at line 429 of file background_tasks.py.

◆ NB_FUNCTIONS

int backend.src.libs.crons.background_tasks.NB_FUNCTIONS = 5

Definition at line 428 of file background_tasks.py.

◆ NB_REPEATS

int backend.src.libs.crons.background_tasks.NB_REPEATS = 2

Definition at line 425 of file background_tasks.py.

◆ SECONDS

int backend.src.libs.crons.background_tasks.SECONDS = 2

Definition at line 427 of file background_tasks.py.

◆ status

backend.src.libs.crons.background_tasks.status
Initial value:
1= BTI.safe_add_task(
2 func=test_current_date,
3 args=(datetime.now,),
4 kwargs=None,
5 trigger=TRIGGER,
6 seconds=SECONDS
7 )

Definition at line 449 of file background_tasks.py.

◆ SUCCES

int backend.src.libs.crons.background_tasks.SUCCES = 0

Definition at line 421 of file background_tasks.py.

◆ TRIGGER

str backend.src.libs.crons.background_tasks.TRIGGER = "interval"

Definition at line 426 of file background_tasks.py.