X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=a1%2Frun.py;fp=a1%2Frun.py;h=c15b6447bb333231c5a07628a2fdc9a7c1168813;hb=8bcc51a6d44d40a1a338fb6a721b5ee8f992f323;hp=67f63d6ca2c63851831fb1dbcaf47390bd824eb9;hpb=6b69910923309e05820706dc025e1441463906c9;p=ric-plt%2Fa1.git diff --git a/a1/run.py b/a1/run.py index 67f63d6..c15b644 100644 --- a/a1/run.py +++ b/a1/run.py @@ -17,8 +17,6 @@ A1 entrypoint # See the License for the specific language governing permissions and # limitations under the License. # ================================================================================== -import time -from threading import Thread from gevent.pywsgi import WSGIServer from a1 import get_module_logger, app from a1 import a1rmr @@ -27,24 +25,11 @@ from a1 import a1rmr logger = get_module_logger(__name__) -def start_rmr_thread(real_init=True): - """ - Start a1s rmr thread - Also called during unit testing - """ - rmr_loop = a1rmr.RmrLoop(real_init) - thread = Thread(target=rmr_loop.loop) - thread.start() - while not rmr_loop.rmr_is_ready(): - time.sleep(0.5) - return rmr_loop # return the handle; useful during unit testing - - def main(): """Entrypoint""" # start rmr thread logger.debug("Initializing rmr thread. A1s webserver will not start until rmr initialization is complete.") - start_rmr_thread() + a1rmr.start_rmr_thread() # start webserver logger.debug("Starting gevent server")