Commit 201f94f5 by Guba Sándor

fixed vmcelery LIBVIRT_KEEPALIVE oprtion to accept False values

parent 3a8cc70a
......@@ -9,6 +9,9 @@ HOSTNAME = gethostname()
AMQP_URI = getenv('AMQP_URI')
def to_bool(value):
return value.lower() in ("true", "yes", "y", "t")
lib_connection = None
celery = Celery('vmcelery', backend='amqp',
......@@ -25,6 +28,6 @@ celery.conf.update(
)
)
if getenv('LIBVIRT_KEEPALIVE') is not None:
if to_bool(getenv('LIBVIRT_KEEPALIVE', False)):
import libvirt
lib_connection = libvirt.open(getenv('LIBVIRT_URI'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment