How oca/queue works
Based on our analysis of both the file tree and the README, the project is a collection of Odoo modules focusing on asynchronous job queue management. This solution extends Odoo’s core functionality by “delaying” model methods into background jobs; it even partitions jobs into different queues or channels, supports scheduled execution (via cron), and includes features for importing/exporting data asynchronously, batch processing, and even web notifications for failures.
• Odoo Core – since all modules are Odoo addons, the core Odoo system (including its ORM, views, and controllers) should be represented.
• Asynchronous Job Queue Engine – the central component where jobs are enqueued and processed. This is primarily depicted by the “queue_job” module.
• Specific Job Modules – each module in the repository provides a distinct feature:
– base_export_async: handles delayed exports.
– base_import_async: manages asynchronous CSV import.
– queue_job_batch: offers batch processing for jobs.
– queue_job_cron and queue_job_cron_jobrunner: extend or replace cron’s scheduled actions with queued jobs.
– queue_job_subscribe: manages job subscription and notifications.
– queue_job_web_notify: provides web-based notifications for failed jobs.
• Job Runner/Worker – a component/button/actor that picks up jobs from the queue, processes them, and reports back. Some modules (e.g., “queue_job_cron_jobrunner”) allow running jobs without a dedicated runner.
• Persistence/Data Storage – the database where job states, arguments, and metadata are stored.
• External/Client Interfaces – if applicable, this includes web controllers (for example, REST controllers in queue_job/controllers) that let users interact with or monitor the job queue.
Relationships and data flows
• How a user action or a triggered model method leads to enqueuing a job through the job queue engine.
Architectural patterns/design principles
• Modularity – each feature (e.g., export, import, cron integration) is implemented as a self-contained Odoo addon. Represent these as separate blocks that plug into the main asynchronous engine.
• Extensibility – note that the project allows for additional modules (such as tests, setup configurations) that interact in standardized ways with Odoo’s framework.