Squashed 'utils_v2/' content from commit 584dbfc

git-subtree-dir: utils_v2
git-subtree-split: 584dbfca44919368a858b02e0b45d503d7ccc874
This commit is contained in:
2025-06-14 11:44:37 +05:30
commit 3dcc80e729
217 changed files with 149793 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
"""
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