File tree Expand file tree Collapse file tree 4 files changed +14
-14
lines changed
Expand file tree Collapse file tree 4 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 88app = Celery ("tasks" ,
99 broker = os .environ .get ('CELERY_BROKER_URL' , 'redis://' ),
1010 backend = os .environ .get ('CELERY_RESULT_BACKEND' , 'redis' ))
11- app .conf .CELERY_ACCEPT_CONTENT = ['pickle' , 'json' , 'msgpack' , 'yaml' ]
12- app .conf .CELERY_WORKER_SEND_TASK_EVENTS = True
11+ app .conf .accept_content = ['pickle' , 'json' , 'msgpack' , 'yaml' ]
12+ app .conf .worker_send_task_events = True
1313
1414
1515@app .task
Original file line number Diff line number Diff line change @@ -396,24 +396,24 @@ async def get(self):
396396:statuscode 503: result backend is not configured
397397 """
398398 app = self .application
399- broker_options = self .capp .conf .BROKER_TRANSPORT_OPTIONS
399+ broker_options = self .capp .conf .broker_transport_options
400400
401401 http_api = None
402402 if app .transport == 'amqp' and app .options .broker_api :
403403 http_api = app .options .broker_api
404404
405405 broker_use_ssl = None
406- if self .capp .conf .BROKER_USE_SSL :
407- broker_use_ssl = self .capp .conf .BROKER_USE_SSL
406+ if self .capp .conf .broker_use_ssl :
407+ broker_use_ssl = self .capp .conf .broker_use_ssl
408408
409409 broker = Broker (app .capp .connection ().as_uri (include_password = True ),
410410 http_api = http_api , broker_options = broker_options , broker_use_ssl = broker_use_ssl )
411411
412412 queue_names = self .get_active_queue_names ()
413413
414414 if not queue_names :
415- queue_names = set ([self .capp .conf .CELERY_DEFAULT_QUEUE ]) | \
416- set ([q .name for q in self .capp .conf .CELERY_QUEUES or [] if q .name ])
415+ queue_names = set ([self .capp .conf .task_default_queue ]) | \
416+ set ([q .name for q in self .capp .conf .task_queues or [] if q .name ])
417417
418418 queues = await broker .queues (sorted (queue_names ))
419419 self .write ({'active_queues' : queues })
Original file line number Diff line number Diff line change @@ -15,15 +15,15 @@ class BrokerView(BaseHandler):
1515 @web .authenticated
1616 async def get (self ):
1717 app = self .application
18- broker_options = self .capp .conf .BROKER_TRANSPORT_OPTIONS
18+ broker_options = self .capp .conf .broker_transport_options
1919
2020 http_api = None
2121 if app .transport == 'amqp' and app .options .broker_api :
2222 http_api = app .options .broker_api
2323
2424 broker_use_ssl = None
25- if self .capp .conf .BROKER_USE_SSL :
26- broker_use_ssl = self .capp .conf .BROKER_USE_SSL
25+ if self .capp .conf .broker_use_ssl :
26+ broker_use_ssl = self .capp .conf .broker_use_ssl
2727
2828 try :
2929 broker = Broker (app .capp .connection (connect_timeout = 1.0 ).as_uri (include_password = True ),
@@ -36,8 +36,8 @@ async def get(self):
3636 try :
3737 queue_names = self .get_active_queue_names ()
3838 if not queue_names :
39- queue_names = set ([self .capp .conf .CELERY_DEFAULT_QUEUE ]) | \
40- set ([q .name for q in self .capp .conf .CELERY_QUEUES or [] if q .name ])
39+ queue_names = set ([self .capp .conf .task_default_queue ]) | \
40+ set ([q .name for q in self .capp .conf .task_queues or [] if q .name ])
4141
4242 queues = await broker .queues (sorted (queue_names ))
4343 except Exception as e :
Original file line number Diff line number Diff line change @@ -114,8 +114,8 @@ def get(self):
114114 capp = self .application .capp
115115
116116 time = 'natural-time' if app .options .natural_time else 'time'
117- if capp .conf .CELERY_TIMEZONE :
118- time += '-' + str (capp .conf .CELERY_TIMEZONE )
117+ if capp .conf .timezone :
118+ time += '-' + str (capp .conf .timezone )
119119
120120 self .render (
121121 "tasks.html" ,
You can’t perform that action at this time.
0 commit comments