The use of this backend is optional and CveXplore can function perfectly without one; the tasks it performs can well be handled by another mechanism. It is, however, a nice addition to the functionalities CveXplore offers.
However, the main.py imports
from CveXplore.core.celery_task_handler.task_handler import TaskHandler
that imports
from celery.schedules import schedule, crontab
from redbeat import RedBeatSchedulerEntry
from redbeat.decoder import RedBeatJSONEncoder
from redbeat.schedulers import ensure_conf
The problem is that even if you choose not to use the Celery runners you must have the celery[redis] and celery-redbeat dependencies installed. As the requirements are made modular and the celery is not included in the default, it is possible to install CveXplore without cvexplore[celery], causing a ModuleNotFoundError, e.g.:
Traceback (most recent call last):
File "cve-search/sbin/db_updater.py", line 28, in <module>
from CveXplore import CveXplore
File "/usr/lib/python3/dist-packages/CveXplore/__init__.py", line 1, in <module>
from CveXplore.main import CveXplore
File "/usr/lib/python3/dist-packages/CveXplore/main.py", line 47, in <module>
from CveXplore.core.celery_task_handler.task_handler import TaskHandler
File "/usr/lib/python3/dist-packages/CveXplore/core/celery_task_handler/task_handler.py", line 12, in <module>
from celery.schedules import schedule, crontab
ModuleNotFoundError: No module named 'celery'
Furthermore, the work on the celery runners have made CveXplore less modular, as requirements/modules/celery.txt inherits all-db.txt dependencies (MongoDB, MySQL, PostgreSQL & SQLite).
The documentation states that
However, the
main.py
importsthat imports
The problem is that even if you choose not to use the Celery runners you must have the
celery[redis]
andcelery-redbeat
dependencies installed. As the requirements are made modular and thecelery
is not included in thedefault
, it is possible to install CveXplore withoutcvexplore[celery]
, causing aModuleNotFoundError
, e.g.:Furthermore, the work on the celery runners have made CveXplore less modular, as
requirements/modules/celery.txt
inheritsall-db.txt
dependencies (MongoDB, MySQL, PostgreSQL & SQLite).