Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4341658
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:30:51+00:00 2026-05-21T11:30:51+00:00

Im using Resque + RedisToGo for my background jobs. I am having trouble running

  • 0

Im using Resque + RedisToGo for my background jobs. I am having trouble running background tasks on Heroku. Its strange because, the first time I run a background job, it gets executed without any issues. But when I run it again, it doesnt execute. I would have to run “heroku restart’, every other time for a background to complete successfully….

For example. If I have the following code in my Resque background action:

module EncodeSong
  @queue = :encode_song

  def self.perform(media_id, s3_file_url)
    puts 'foobar'

    media = Media.find(media_id)

    puts 'media id is supposed to be here'
    puts media.id
    puts s3_file_url
  end
end

In “heroku console”, I do:

Resque.enqueue(EncodeSong, 26, 'http://actual_bucket_name.s3.amazonaws.com/unencoded/users/1/songs/test.mp3')

In “heroku logs”, I can see the 4 “puts”, when I run the above code for the first time. But running it a second time, only returns ‘foobar’. The other “puts” are not displayed…..

I suspect that it is not able to run “media = Media.find(media_id)”, the second time around. This is only happening on the production server on Heroku. On our local development machine, we do not experience this problem…. Anyone know what is wrong?

PS. I have tried enabling Heroku logs, but still don’t get any useful response. I have followed this tutorial to set up Heroku with Resque

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T11:30:52+00:00Added an answer on May 21, 2026 at 11:30 am

    Seems like your job is failing (probably you’re right about the ‘media = Media.find’ line). Look through the resque admin interface. Look for failed jobs, there you’ll find the backtrace of each failed job.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using resque/redis on heroku to send emails as a background job. It works
I am using Resque to process some background jobs on a Rails application. The
Using CI for the first time and i'm smashing my head with this seemingly
I'm using Rails with resque. The sleep time is the seconds of a worker
I'm having trouble calling methods from an included module inside a resque worker. In
When setting up Resque for the first time in Rails, I'm getting an error.
I am using rails 3 with devise for authentication and resque for handling background
If I'm running a resque cron job to run every hour using resque-scheduler on
I am trying to generate xml file as a background task using resque gem
I'm using Resque on a rails-3 project to handle jobs that are scheduled to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.