OdooWiki OCA HUB

Storage File Swap Backend Queue

storage_file_swap_backend_queue folder_open OCA/storage open_in_new
Storage License: LGPL-3

This module integrates storage_file with queue_job to delegate the backend swap operation to asynchronous jobs.

When swapping files between storage backends via the wizard, the operation is split into batches and dispatched as queue jobs instead of running synchronously. This avoids timeouts when moving large numbers of files.

auto_awesome What this module does

AI-generated from the code · Odoo 18.0

Lets you move files between storage backends in the background using queue jobs, so large swaps do not time out. A new option on each storage backend controls whether swaps run asynchronously.

When you swap files from one storage backend to another, this module can run the operation in the background instead of waiting for it to finish on screen. This is useful when many files must be moved and the normal process would take too long.

  • On each storage backend, a new setting "Use Queue for Backend Swap" decides whether swaps involving that backend are sent to the queue. It is off by default.
  • In the swap wizard, a read-only "Use Queue Jobs" field shows whether the selected source backend is configured for background processing.
  • When the option is on, the files are split into small batches and each batch is processed as a separate background job. The batch size defaults to 5 and can be changed through a system parameter.
  • Each job reports what happened: which files were moved, which failed, and whether records no longer exist. If the destination backend was deleted, the job reports that instead of failing silently.
  • A dedicated queue channel named storage_file_swap is created for these jobs.

The module touches the storage backend configuration, the file swap wizard and the storage file records. It does not change how files are stored; it only changes when and how the swap is executed.

Models and fields (2)
  • storage.backend · extends an existing modelswap_backend_use_queue (Use Queue for Backend Swap)
  • storage.file.swap.backend · extends an existing modeluse_queue (Use Queue Jobs)

Text generated by AI (DeepSeek) from reading the Odoo 18.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

terminal Installation and usage

OCA documentation · Odoo 18.0

The batch size (number of files processed per job) can be tuned via the system parameter:

storage_file_swap_backend_queue.swap_backend_batch_size

Default value is 5. Set it in Settings \> Technical \> Parameters \> System Parameters to adjust throughput vs. job granularity.

A dedicated job channel root.storage_file_swap is created at install. You can configure its concurrency in Settings \> Technical \> Queue Job \> Channels.

No verified information in OCA: Installation, Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.