Remove daemon helper from analyzer

Let the system daemonize the process.
This commit is contained in:
jo 2021-06-05 16:28:37 +02:00
parent e8d5481422
commit ce976743e7
2 changed files with 5 additions and 17 deletions

View file

@ -6,7 +6,6 @@ import argparse
import os
import airtime_analyzer.airtime_analyzer as aa
import daemon
VERSION = "1.0"
LIBRETIME_CONF_DIR = os.getenv("LIBRETIME_CONF_DIR", "/etc/airtime")
@ -18,7 +17,6 @@ def main():
"""Entry-point for this application"""
print("LibreTime Analyzer {}".format(VERSION))
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--daemon", help="run as a daemon", action="store_true")
parser.add_argument(
"--debug", help="log full debugging output", action="store_true"
)
@ -42,15 +40,6 @@ def main():
if args.http_retry_queue_file:
http_retry_queue_path = args.http_retry_queue_file
if args.daemon:
with daemon.DaemonContext():
aa.AirtimeAnalyzerServer(
rmq_config_path=rmq_config_path,
http_retry_queue_path=http_retry_queue_path,
debug=args.debug,
)
else:
# Run without daemonizing
aa.AirtimeAnalyzerServer(
rmq_config_path=rmq_config_path,
http_retry_queue_path=http_retry_queue_path,

View file

@ -22,7 +22,6 @@ setup(
"mutagen==1.42.0",
"pika~=1.1.0",
"file-magic",
"python-daemon",
"requests>=2.7.0",
"rgain3==1.0.0",
"pycairo==1.19.1",