简体   繁体   中英

Sidekiq with Heroku & Rails : my Jobs are stucks in queue on Heroku

Solution EDIT :

The worker button on Heroku was not turned from Off to On...


I'm trying to use Sidekiq on my RailsApp. The configuration works fine in development but in Product with Heroku, all Jobs are enqued but stuck in queue.

Some insight :

I've done the config of Redis_to_go on Heroku.

Sidekiq dashboard 在此处输入图片说明

Heroku Job logs

2018-11-09T17:28:15.648569+00:00 app[web.1]: I, [2018-11-09T17:28:15.648360 #4]  INFO -- : [66d0e53c-5fd1-42a9-bb28-4df4a40b6f09] 

[ActiveJob] Enqueued CreateMemberContactJob (Job ID: 12785f83-5b69-4bc4-ad87-3945694e8337) 

to Sidekiq(default) with arguments: #<GlobalID:0x000055ec32248780 @uri=#<URI::GID gid://youguildapp/Member/85>>

All my configuration & code : Procfile

web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq

Application.rb

config.active_job.queue_adapter = :sidekiq

Registrationscontroller.rb

CreateMemberContactJob.perform_later @member

class CreateMemberContactJob < ApplicationJob queue_as :default

CreateMemberContactJob

class CreateMemberContactJob < ApplicationJob
  queue_as :default

  def perform(member)
    api_instance = SibApiV3Sdk::ContactsApi.new
    create_contact = SibApiV3Sdk::CreateContact.new
    create_contact.email = member.email

    api_instance.create_contact(create_contact)
  end

end

Please help me, I've passed by all SO posts & Sidekiq wifi & Medium posts & holy books but I didn't figured out.

Many thanks

This is how you turn the heroku worker dyno button on:

如何打开heroku dyno?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM