Files
cosec_automation/cron/dibs.py
T
khushalps a1c1853ca5 Squashed 'utils_v2/' content from commit 88e444a
git-subtree-dir: utils_v2
git-subtree-split: 88e444ac57ca6c090736645616d8a8a2d2af367b
2025-11-14 16:53:30 +05:30

99 lines
4.3 KiB
Python

"""
AUTHOR:
Khushal P Soonderji
DATE:
Saturday, 7th Jun., 2025
OBJECTIVE:
To have a system where a single cron file can run on several servers and claim dibs on which instance gets to do
the task. The idea is to have all the running cron scripts announce their availability to do the task and then
one of them gets to do the actual task based on who announced its availability first.
REFERENCES:
N/A
DOWNLOADS:
N/A
"""
# *****************************************************************************************************************
# ***** ****
# *** IMPORT ***
# ***** ****
# *****************************************************************************************************************
# System-level activities:
import os
import distro
import socket
import platform
# For data-modelling:
from pydantic import BaseModel, Field
from typing import Any, Optional, List, Literal
# To work with date and time:
import datetime
# *****************************************************************************************************************
# ***** ****
# *** MACROS / ONE-TIME INIT ***
# ***** ****
# *****************************************************************************************************************
# --- Nothing Yet
# *****************************************************************************************************************
# ***** ****
# *** VARIABLES ***
# ***** ****
# *****************************************************************************************************************
# --- Nothing Yet
# *****************************************************************************************************************
# ***** ****
# *** CLASSES ***
# ***** ****
# *****************************************************************************************************************
# --- Nothing Yet
# *****************************************************************************************************************
# ***** ****
# *** FUNCTIONS ***
# ***** ****
# *****************************************************************************************************************
# --- Nothing Yet
# *****************************************************************************************************************
# ***** ****
# *** MAIN PROGRAM ***
# ***** ****
# *****************************************************************************************************************
if __name__ == "__main__":
pass