fulltext/extract.py
def create_worker_app(app: Flask) -> Celery:
    """
    Initialize the worker application.

    Returns
    -------
    :class:`celery.Celery`

    """
    result_backend = app.config['CELERY_RESULT_BACKEND']
    broker = app.config['CELERY_BROKER_URL']
    celery_app = Celery('fulltext',
                        results=result_backend,
                        backend=result_backend,
                        result_backend=result_backend,
                        broker=broker)

    celery_app.conf.queue_name_prefix = app.config['CELERY_QUEUE_NAME_PREFIX']
    celery_app.conf.task_default_queue = app.config['CELERY_TASK_DEFAULT_QUEUE']
    celery_app.conf.prefetch_multiplier = app.config['CELERY_PREFETCH_MULTIPLIER']
    celery_app.conf.task_acks_late = app.config['CELERY_TASK_ACKS_LATE']
    celery_app.conf.backend = result_backend
    celery_app.conf.result_extended = app.config['CELERY_RESULT_EXTENDED']

    celery_app.task(extract, name='extract')
    celery_app.task(do_nothing, name='do_nothing')
    return celery_app

    Initialize the worker application.

    Returns
    -------
    :class:`celery.Celery`

    
Initialize the worker application.
Returns
Initialize the worker application . Returns
def create_worker_app(app: Flask) -> Celery:
    result_backend = app.config['CELERY_RESULT_BACKEND']
    broker = app.config['CELERY_BROKER_URL']
    celery_app = Celery('fulltext',
                        results=result_backend,
                        backend=result_backend,
                        result_backend=result_backend,
                        broker=broker)
    celery_app.conf.queue_name_prefix = app.config['CELERY_QUEUE_NAME_PREFIX']
    celery_app.conf.task_default_queue = app.config['CELERY_TASK_DEFAULT_QUEUE']
    celery_app.conf.prefetch_multiplier = app.config['CELERY_PREFETCH_MULTIPLIER']
    celery_app.conf.task_acks_late = app.config['CELERY_TASK_ACKS_LATE']
    celery_app.conf.backend = result_backend
    celery_app.conf.result_extended = app.config['CELERY_RESULT_EXTENDED']
    celery_app.task(extract, name='extract')
    celery_app.task(do_nothing, name='do_nothing')
    return celery_app
def create_worker_app ( app : Flask ) -> Celery : result_backend = app . config [ 'CELERY_RESULT_BACKEND' ] broker = app . config [ 'CELERY_BROKER_URL' ] celery_app = Celery ( 'fulltext' , results = result_backend , backend = result_backend , result_backend = result_backend , broker = broker ) celery_app . conf . queue_name_prefix = app . config [ 'CELERY_QUEUE_NAME_PREFIX' ] celery_app . conf . task_default_queue = app . config [ 'CELERY_TASK_DEFAULT_QUEUE' ] celery_app . conf . prefetch_multiplier = app . config [ 'CELERY_PREFETCH_MULTIPLIER' ] celery_app . conf . task_acks_late = app . config [ 'CELERY_TASK_ACKS_LATE' ] celery_app . conf . backend = result_backend celery_app . conf . result_extended = app . config [ 'CELERY_RESULT_EXTENDED' ] celery_app . task ( extract , name = 'extract' ) celery_app . task ( do_nothing , name = 'do_nothing' ) return celery_app
Initialize the worker application.
Initialize the worker application .
"""
    Initialize the worker application.

    Returns
    -------
    :class:`celery.Celery`

    """
app
Flask
class
None