У меня небольшой вызов, и мне интересно, может ли кто-нибудь помочь. У меня нет проблем с запуском сельдерея вручную, однако, если я использую ритм с планировщиком djcelery, я получаю кучу ошибок базы данных.
работник: Теплое отключение (MainProcess)
(environment) [root@pse apps]# celery -A services_backend beat -l debug --max-interval=10
celery beat v3.1.26.post2 (Cipater) is starting.
__ - ... __ - _
Configuration ->
. broker -> redis://localhost:6379//
. loader -> celery.loaders.app.AppLoader
. scheduler -> djcelery.schedulers.DatabaseScheduler
. logfile -> [stderr]@%DEBUG
. maxinterval -> 10.00 seconds (10.0s)
[2020-03-24 01:46:42,962: DEBUG/MainProcess] Setting default socket timeout to 30
[2020-03-24 01:46:42,964: INFO/MainProcess] beat: Starting...
[2020-03-24 01:46:42,964: DEBUG/MainProcess] DatabaseScheduler: intial read
[2020-03-24 01:46:42,964: INFO/MainProcess] Writing entries (0)...
[2020-03-24 01:46:42,964: CRITICAL/MainProcess] beat raised exception <class 'AttributeError'>: AttributeError("'DatabaseFeatures' object has no attribute 'autocommits_when_autocommit_is_off'",)
Traceback (most recent call last):
File "/opt/pse/apps/environment/lib/python3.6/site-packages/kombu/utils/_init__.py", line 323, in __get_
return obj.__dict__[self.__name__]
KeyError: 'scheduler'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/pse/apps/environment/lib/python3.6/site-packages/celery/apps/beat.py", line 112, in start_scheduler
beat.start()
File "/opt/pse/apps/environment/lib/python3.6/site-packages/celery/beat.py", line 470, in start
humanize_seconds(self.scheduler.max_interval))
File "/opt/pse/apps/environment/lib/python3.6/site-packages/kombu/utils/_init__.py", line 325, in __get_
value = obj.__dict__[self.__name__] = self.__get(obj)
File "/opt/pse/apps/environment/lib/python3.6/site-packages/celery/beat.py", line 512, in scheduler
return self.get_scheduler()
File "/opt/pse/apps/environment/lib/python3.6/site-packages/celery/beat.py", line 507, in get_scheduler
lazy=lazy)
File "/opt/pse/apps/environment/lib/python3.6/site-packages/celery/utils/imports.py", line 53, in instantiate
return symbol_by_name(name)(*args, **kwargs)
File "/opt/pse/apps/environment/lib/python3.6/site-packages/djcelery/schedulers.py", line 161, in _init_
Scheduler.__init__(self, *args, **kwargs)
File "/opt/pse/apps/environment/lib/python3.6/site-packages/celery/beat.py", line 185, in _init_
self.setup_schedule()
File "/opt/pse/apps/environment/lib/python3.6/site-packages/djcelery/schedulers.py", line 169, in setup_schedule
self.install_default_entries(self.schedule)
File "/opt/pse/apps/environment/lib/python3.6/site-packages/djcelery/schedulers.py", line 263, in schedule
self.sync()
File "/opt/pse/apps/environment/lib/python3.6/site-packages/djcelery/schedulers.py", line 217, in sync
with commit_on_success():
File "/usr/lib64/python3.6/contextlib.py", line 81, in _enter_
return next(self.gen)
File "/opt/pse/apps/environment/lib/python3.6/site-packages/djcelery/db.py", line 52, in commit_on_success
if connection.features.autocommits_when_autocommit_is_off:
AttributeError: 'DatabaseFeatures' object has no attribute 'autocommits_when_autocommit_is_off'
Я пользуюсь следующими версиями: -
- Django - 3.0.3
- Сельдерей 3.1.26.post2
- django -целери 3.3 .1
- redis 3.4.1
Спасибо