Skip to main content

Import and export backends

Added in 1.0.1

The user picks an execution backend on the import/export form.

BackendEnumBehaviour
InlineINLINERuns in the request process
Python queuePYTHON_QUEUEProcess-local worker queue
CeleryCELERYOptional extra; requires a working broker

CeleryAvailabilityService hides Celery when the extra is not installed or the broker is not usable.

Inline

Simplest. Fine for small files. The HTTP request stays open until the job finishes.

Python queue

ImportExportPythonQueueService is process-local. A job queued on one gunicorn worker is not visible to another. Use it for development or a single-process deploy, not a multi-worker production fleet.

Celery

pip install 'django-chassis[celery]'

The task lives at django_chassis.tasks.process_import_export. Configure Celery in the project as usual. Chassis only dispatches and records history.

Dispatch

ImportExportDispatchService creates the history row and hands the job to the selected backend. ImportExportProcessService locks the row and runs it. Do not call these services from domain code unless you are extending the flow.

See also