celery: remove deprecated settings warnings (#86725)
gitea/hobo/pipeline/head This commit looks good Details

This commit is contained in:
Nicolas Roche 2024-02-08 14:29:35 +01:00 committed by Nicolas Roche
parent 5423cdf475
commit 159f93a783
3 changed files with 13 additions and 13 deletions

View File

@ -16,11 +16,11 @@ def notify_agents(data):
}
with Celery('hobo', broker=settings.BROKER_URL) as app:
app.conf.update(
CELERY_TASK_SERIALIZER='json',
CELERY_ACCEPT_CONTENT=['json'],
CELERY_RESULT_SERIALIZER='json',
CELERY_QUEUES=(Broadcast('broadcast_tasks'),),
CELERY_EVENT_QUEUE_TTL=10,
task_serializer='json',
accept_content=['json'],
result_serializer='json',
task_queues=(Broadcast('broadcast_tasks'),),
event_queue_ttl=10,
)
# see called method in hobo.agent.worker.celery
app.send_task(

View File

@ -22,10 +22,10 @@ from . import services, settings
app = Celery('hobo', broker=settings.BROKER_URL)
app.conf.update(
CELERY_TASK_SERIALIZER='json',
CELERY_ACCEPT_CONTENT=['json'],
CELERY_RESULT_SERIALIZER='json',
CELERY_QUEUES=(Broadcast('broadcast_tasks'),),
task_serializer='json',
accept_content=['json'],
result_serializer='json',
task_queues=(Broadcast('broadcast_tasks'),),
)
if hasattr(settings, 'CELERY_SETTINGS'):

View File

@ -56,10 +56,10 @@ def notify_agents(sender, **kwargs):
tls.MUST_NOTIFY = False
with Celery('hobo', broker=settings.BROKER_URL) as app:
app.conf.update(
CELERY_TASK_SERIALIZER='json',
CELERY_ACCEPT_CONTENT=['json'],
CELERY_RESULT_SERIALIZER='json',
CELERY_QUEUES=(Broadcast('broadcast_tasks'),),
task_serializer='json',
accept_content=['json'],
result_serializer='json',
task_queues=(Broadcast('broadcast_tasks'),),
)
# see called method in hobo.agent.worker.celery
app.send_task(