mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-12 05:35:19 +00:00
stub service
This commit is contained in:
parent
19984b43f4
commit
f158bc3778
6 changed files with 92 additions and 52 deletions
|
|
@ -1,6 +1,19 @@
|
|||
import argparse
|
||||
import time
|
||||
|
||||
from .core.config import load_config
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="lego-monitoring",
|
||||
description="Lego-monitoring service",
|
||||
)
|
||||
parser.add_argument('-c', '--config', required=True)
|
||||
|
||||
config_path = parser.parse_args().config
|
||||
config = load_config(config_path)
|
||||
|
||||
while True:
|
||||
print("service running...")
|
||||
print(f"service running... opt 1 is {config.non_secret_config_option}, opt 2 is secret, but if you really wanna know, it's {config.config_option}", flush=True)
|
||||
time.sleep(300)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue