0

I am trying to add bridge between Rails and Phoenix framework to communicate. So far I can enqueue jobs in rails and those are picked up by Exq in phoenix framework.

Sidekiq::Client.push({"queue" => "elixir_queue", "class" => "ElixirQueue", "args" => ["foo"]})

But I am having issue enqueueing job from Elixir for rails to pick up. I tried this and it enqueues job

Exq.enqueue(Exq, "rails_queue", 'RailsQueueJob' , ["Hello there rails"],  max_retries: 0) 

but Sidekiq on rails side throws error saying "error_message\":\"undefined method jid=' for #< RailsQueueJob:0x00007fe599dfda50>. There happens to be no documentation for this. How can I Enqueue from elixir and let Sidekiq pick up the job.

quazar
  • 570
  • 4
  • 14

2 Answers2

0

I guess that means that you need to steak to Sidekiq Job Format. https://github.com/mperham/sidekiq/wiki/Job-Format I.e. Sidekiq is trying to fetch jid out of the RailsQueueJob - you need to define it by yourself I guess.

Serhii Nadolynskyi
  • 5,473
  • 3
  • 21
  • 20
0

It's a rails issue. Explained here https://github.com/mperham/sidekiq/issues/3073

quazar
  • 570
  • 4
  • 14