Skip to content

Fastest_CSV Crashes in Sidekiq #10

@jonmchan

Description

@jonmchan

This might help others who decide to use fastest_csv with sidekiq. Known bug that alias_method (used in fastest_csv) will cause sidekiq to crash (sidekiq/sidekiq#2139). Best way around it when working inside a sidekiq worker is to avoid using FastestCSV#shift such as by:

  csv_file = File.open('your/csv/file/here.csv', 'rb')
  shift(csv_file) # manually handle it instead

  def shift csv_file
    if line = csv_file.gets
      line.parse_csv
    else
      nil
    end
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions