extract envvar to module-level variable
This commit is contained in:
4
app.py
4
app.py
@@ -23,10 +23,12 @@ sentry_sdk.init("https://3fa5ae886ba1489092ad49a93cb419c1@sentry.kmlabz.com/9")
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
LOGGER = logging.getLogger(__name__)
|
||||
|
||||
KNOWNCONSUMER= os.environ["PRODUCER_KNOWNCONSUMER"]
|
||||
|
||||
if __name__ == "__main__":
|
||||
LOGGER.info("Producer started")
|
||||
generateduuid = str(uuid)
|
||||
communicator = Communicator(currentconsumer=os.environ["KnownConsumer"], uuid=generateduuid)
|
||||
communicator = Communicator(currentconsumer=KNOWNCONSUMER, uuid=generateduuid)
|
||||
LOGGER.debug(f"My uuid is {generateduuid}")
|
||||
consumerlocator = ConsumerLocator(uuid=generateduuid, communicator=communicator)
|
||||
messagesender = MessageSender(communicator=communicator)
|
||||
|
||||
Reference in New Issue
Block a user