searxng/searx/services/dummy.py
Markus Heiser 6563396433 [mod] add a process manager infrastructure (based on hapless)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2022-09-26 16:46:15 +02:00

25 lines
546 B
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""A dummy service to demonstrate SearXNG service management"""
import os
import sys
import time
def main():
print("This is arguments")
print(f"{sys.argv}")
print("This is environment", flush=True)
for key, value in os.environ.items():
print(f"{key} : {value}", flush=True)
# this should be running for about 2 hours
for i in range(1000):
print(f"Iteration {i}...", flush=True)
time.sleep(10)
if __name__ == "__main__":
main()