Commit b2f472d6 authored by Samuel GAIST's avatar Samuel GAIST

[utils][management][commands][broker] Fix name handling

The callbacks receive the name of the worker as bytes,
convert them to string in order to be able to properly
filter the database content.
parent e61af2f5
Pipeline #43141 passed with stage
in 15 minutes and 26 seconds
......@@ -30,6 +30,7 @@ import logging
from import BaseCommand
from django.db import transaction
from django.utils.encoding import force_str
from import BeatComputationBroker
from beat.core.utils import setup_logging
......@@ -41,6 +42,7 @@ logger = logging.getLogger(__name__)
def onWorkerReady(name):
name = force_str(name)"Worker '%s' is ready", name)
worker = Worker.objects.get(name=name)
......@@ -57,6 +59,7 @@ def onWorkerReady(name):
def onWorkerGone(name):
name = force_str(name)"Worker '%s' is gone", name)
worker = Worker.objects.get(name=name)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment