Skip to content

Proposal: Add Background Task Support for Export Functionality #1975

@bmihelac

Description

@bmihelac

I propose extending the export functionality in django-import-export to use background tasks. This would offer several key benefits:

  • Improved user experience, as users wouldn’t need to wait for the export to finish.
  • Avoiding server timeouts for long-running exports.
  • The export process can run asynchronously, freeing up server resources.

In the near future, Django will include integrated support for background workers, as DEP 0014: Background Workers has been accepted and is currently in the implementation phase. For older Django versions, the reference implementation, django-tasks, can be used, making this change backward-compatible with LTS versions like Django 4.2.

This proposal focuses on background task support for exporting only, as background imports introduce more complexity, particularly around handling errors and database changes.

For context, the third-party package django-import-export-celery offers both import and export functionality with Celery but requires a working Celery setup.

More information about django-tasks:

Please take a moment to read through the details and share any feedback, suggestions, or concerns you might have.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions