Coverage for portality / tasks / consumer_main_queue.py: 58%
24 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-05 00:09 +0100
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-05 00:09 +0100
1# NOTE: this file is designed to be imported by Huey, the background job processor
2# It changes the logging configuration. If it's imported anywhere else in the app,
3# it will change the logging configuration for the entire app.
4import logging
5from portality.core import app
7logging.getLogger("requests").setLevel(logging.WARNING)
8logging.getLogger("urllib3").setLevel(logging.WARNING)
10# import the queues
11from portality.tasks.redis_huey import main_queue # noqa
13# now import the tasks that will bind to those queues
15# these are the ones which bind to the main_queue
16from portality.tasks.reporting import scheduled_reports, run_reports # noqa
17from portality.tasks.journal_in_out_doaj import set_in_doaj # noqa
18from portality.tasks.sitemap import scheduled_sitemap, generate_sitemap # noqa
19from portality.tasks.journal_bulk_edit import journal_bulk_edit # noqa
20from portality.tasks.suggestion_bulk_edit import suggestion_bulk_edit # noqa
21from portality.tasks.ingestarticles import ingest_articles # noqa
22from portality.tasks.preservation import preserve # noqa
23from portality.tasks.journal_csv import scheduled_journal_csv, journal_csv # noqa
24from portality.tasks.read_news import scheduled_read_news, read_news # noqa
25from portality.tasks.journal_bulk_delete import journal_bulk_delete # noqa
26from portality.tasks.article_bulk_delete import article_bulk_delete # noqa
27from portality.tasks.async_workflow_notifications import async_workflow_notifications # noqa
28from portality.tasks.check_latest_es_backup import scheduled_check_latest_es_backup, check_latest_es_backup # noqa
29from portality.tasks.request_es_backup import scheduled_request_es_backup, request_es_backup # noqa
30from portality.tasks.find_discontinued_soon import scheduled_find_discontinued_soon, find_discontinued_soon # noqa
31from portality.tasks.datalog_journal_added_update import scheduled_datalog_journal_added_update, datalog_journal_added_update # noqa
32from portality.tasks.article_bulk_create import article_bulk_create # noqa
34# Conditionally enable new application autochecking
35if app.config.get("AUTOCHECK_INCOMING", False):
36 from portality.tasks.application_autochecks import application_autochecks