celery.py 文件源码

python
阅读 31 收藏 0 点赞 0 评论 0

项目:zeus 作者: getsentry 项目源码 文件源码
def init_app(self, app, sentry):
        self.app = app
        new_celery = celery.Celery(
            app.import_name,
            broker=app.config['CELERY_BROKER_URL'],
            backend=app.config['CELERY_RESULT_BACKEND'],
        )
        # XXX(dcramer): why the hell am I wasting time trying to make Celery work?
        self.celery.__dict__.update(vars(new_celery))
        self.celery.conf.update(app.config)

        worker_process_init.connect(self._worker_process_init)

        task_postrun.connect(self._task_postrun)
        task_prerun.connect(self._task_prerun)

        if sentry:
            register_signal(sentry.client)
            register_logger_signal(sentry.client)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号