PhoenixKit.Modules.Shop.Workers.CSVImportWorker (phoenix_kit v1.7.62)

Copy Markdown View Source

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_uuid - UUID of the ImportLog record
  • path - Path to the uploaded CSV file
  • config_uuid - Optional ImportConfig UUID for filtering rules

Usage

The Imports LiveView enqueues jobs after file upload:

CSVImportWorker.new(%{
  import_log_uuid: log.uuid,
  path: "/tmp/uploads/products.csv",
  config_uuid: config.uuid  # optional
})
|> Oban.insert()

Queue Configuration

Add the shop_imports queue to your Oban config:

config :my_app, Oban,
  queues: [default: 10, shop_imports: 2]