Add MONITOR_INTERVAL environment variable support
All checks were successful
Lint & Compile Check / check (push) Successful in 6s
All checks were successful
Lint & Compile Check / check (push) Successful in 6s
This commit is contained in:
@@ -224,7 +224,7 @@ def fetch_and_analyze(session, verbose=False):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(description="AdGuard Monitor Service")
|
parser = argparse.ArgumentParser(description="AdGuard Monitor Service")
|
||||||
parser.add_argument("--interval", type=int, default=15, help="Update interval in seconds")
|
parser.add_argument("--interval", type=int, default=int(os.getenv("MONITOR_INTERVAL", 15)), help="Update interval in seconds")
|
||||||
parser.add_argument("--verbose", action="store_true", help="Log all queries for monitored clients")
|
parser.add_argument("--verbose", action="store_true", help="Log all queries for monitored clients")
|
||||||
parser.add_argument("--test", action="store_true", help="Send a fake test notification and exit")
|
parser.add_argument("--test", action="store_true", help="Send a fake test notification and exit")
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|||||||
Reference in New Issue
Block a user