Commit f0f2dc46 authored by Flavio TARSETTI's avatar Flavio TARSETTI

Merge branch 'fix_broker_callbacks' into 'django3_migration'

Fix name handling in broker callbacks

See merge request !390
parents e61af2f5 b2f472d6
Pipeline #43149 passed with stage
in 15 minutes and 27 seconds
......@@ -30,6 +30,7 @@ import logging
from django.core.management.base import BaseCommand
from django.db import transaction
from django.utils.encoding import force_str
from beat.core.bcpapi.broker import BeatComputationBroker
from beat.core.utils import setup_logging
......@@ -41,6 +42,7 @@ logger = logging.getLogger(__name__)
def onWorkerReady(name):
name = force_str(name)
logger.info("Worker '%s' is ready", name)
try:
worker = Worker.objects.get(name=name)
......@@ -57,6 +59,7 @@ def onWorkerReady(name):
def onWorkerGone(name):
name = force_str(name)
logger.info("Worker '%s' is gone", name)
try:
worker = Worker.objects.get(name=name)
......
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 to comment