Remove wrapper

- Removed wrapper.py
- Removed main.py
- modified radical-api.service to launch the gunicorn process directly.
- Removed exit code in update method.
This commit is contained in:
Riley Housden 2021-12-01 01:52:14 -05:00
parent e6f4eb5404
commit 16b3d03841
Signed by: InValidFire
GPG key ID: 0D6208F6DF56B4D8
4 changed files with 2 additions and 40 deletions

View file

@ -1,29 +0,0 @@
"""Wrapper Class to handle reboots"""
import subprocess
import sys
class Wrapper:
def __init__(self, args, stdout):
"""
Wraps another program and helps with restarting should the program request.
:param args: Arguments used to run program
:param stdout: The stdout stream to send output to
"""
self._args = args
self.process = None
self._stdout = stdout
def start(self):
"""
Start the wrapper.
:return: None
"""
self.process = subprocess.Popen(self._args, stdout=self._stdout)
while True:
while self.process.poll() is None:
pass
if self.process.returncode == 26:
self.process = subprocess.Popen(self._args, stdout=self._stdout)
else:
sys.exit()