Oban worker for background CSV import.
Processes CSV files with automatic format detection via the ImportFormat behaviour. Supports Shopify, Prom.ua, and other formats transparently.
Job Arguments
import_log_id- ID of the ImportLog recordpath- Path to the uploaded CSV fileconfig_id- Optional ImportConfig ID for filtering rules
Usage
The Imports LiveView enqueues jobs after file upload:
CSVImportWorker.new(%{
import_log_id: log.id,
path: "/tmp/uploads/products.csv",
config_id: config.id # optional
})
|> Oban.insert()Queue Configuration
Add the shop_imports queue to your Oban config:
config :my_app, Oban,
queues: [default: 10, shop_imports: 2]