Coverage for portality / tasks / consumer_events_queue.py: 94%

17 statements  

« 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 

6 

7logging.getLogger("requests").setLevel(logging.WARNING) 

8logging.getLogger("urllib3").setLevel(logging.WARNING) 

9 

10# import the queues 

11from portality.tasks.redis_huey import events_queue # noqa 

12 

13# now import the tasks that will bind to those queues 

14 

15from portality.tasks.article_bulk_create import article_bulk_create # noqa 

16from portality.tasks.article_bulk_delete import article_bulk_delete # noqa 

17from portality.tasks.ingestarticles import ingest_articles # noqa 

18from portality.tasks.journal_bulk_delete import journal_bulk_delete # noqa 

19from portality.tasks.journal_bulk_edit import journal_bulk_edit # noqa 

20from portality.tasks.preservation import preserve # noqa 

21from portality.tasks.journal_in_out_doaj import set_in_doaj # noqa 

22from portality.tasks.suggestion_bulk_edit import suggestion_bulk_edit # noqa 

23from portality.tasks.admin_reports import admin_reports # noqa 

24from portality.tasks.process_event import process_event_execute 

25 

26# Conditionally enable new application autochecking 

27if app.config.get("AUTOCHECK_INCOMING", False): 

28 from portality.tasks.application_autochecks import application_autochecks # noqa