Commit 01005da6 authored by acpaquette's avatar acpaquette
Browse files

Addressed weird stdout section and replaced with logging

parent 309a9ab9
Loading
Loading
Loading
Loading
+3 −16
Original line number Diff line number Diff line
@@ -193,22 +193,9 @@ def manage_messages(args, queue):
        #Convert the message from binary into a dict
        msgdict = json.loads(msg, object_hook=object_hook)


        # should replace this with some logging logic later
        # rather than redirecting std out
        stdout = StringIO()
        with redirect_stdout(stdout):
        # Apply the algorithm
        response = process(msgdict)
            # Should go to a logger someday! (today is that day!)
            print(response)

        out = stdout.getvalue()
        # print to get everything on the logs in the directory
        log.info(out)

        sys.stdout.flush()
        stdout.flush()
        log.info(response)

        #serializedDict = json.loads(msg)
        #results  = msgdict['results'] if msgdict['results'] else [{"status" : "success"}]