updates and dedicated probe handler function

This commit is contained in:
2024-08-04 22:20:42 +02:00
parent 0c0243c407
commit ffbf466416
3 changed files with 13 additions and 6 deletions

View File

@ -4,6 +4,7 @@ import kopf
import schedule
import time
import threading
import datetime
from utils.utils import command_wrapper, unlock_bw, sync_bw
@ -20,6 +21,10 @@ def bitwarden_signin(logger, **kwargs):
command_wrapper(logger, "login --apikey")
unlock_bw(logger)
@kopf.on.probe(id='now')
def get_current_timestamp(**kwargs):
return datetime.datetime.now(datetime.timezone.utc).isoformat()
def run_continuously(interval=30):
cease_continuous_run = threading.Event()