Commit fd3ae57c authored by Jonathan Schaeffer's avatar Jonathan Schaeffer
Browse files

Missing RUNMODE

parent c48ae4a2
......@@ -19,18 +19,18 @@ from resif_pyinventory import resif_pyinventory
SCRIPT_VERSION = "2022.060"
# script behavior depends on RUNMODE variable
RUNMODE = os.environ["RUNMODE"]
# Logger configuration
logger = logging.getLogger('amqpWorker')
logger.setLevel(level=logging.INFO if RUNMODE == "production" else logging.DEBUG)
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
# script behavior depends on RUNMODE variable
RUNMODE = os.environ["RUNMODE"]
# AMQP broker
AMQP_SERVER = os.environ.get("AMQP_SERVER", "amqp-geodata.ujf-grenoble.fr:5672")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment