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

  • Home
  • SEARCH
  • 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 7582405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:25:39+00:00 2026-05-30T18:25:39+00:00

I need to implement a feature that lets resque jobs timeout if they are

  • 0

I need to implement a feature that lets resque jobs timeout if they are not processed within a certain time.

So lets say a job is created but can’t be processed within one hour because the queue is too long and/or there is not enough workers working them off.

I wan’t the job to be deleted in such a case…whats the best way to do that? Maybe there is a config parameter I’m overseeing or a 3rd party gem?

Thanks

  • 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-30T18:25:41+00:00Added an answer on May 30, 2026 at 6:25 pm

    I don’t know if there’s a way to do this in Resque by default, but it wouldn’t be hard to do yourself.

    In your job do something like this:

    def perform(id, queued_at)
      return false unless Time.parse(queued_at) >= 1.hour.ago
    
      ...
    end
    

    And to enqueue jobs, do: Resque.enqueue(MyJobClass, object.id, DateTime.now). The first line will automatically dump the job and prevent it from being performed if it was queued longer than an hour ago.

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

Sidebar

Related Questions

Lets say that I have a function todo() and I want to implement this
I need to implement a feature that would allow users to filter table data
I need to implement a login feature for the web application that I am
I need to implement a feature similar to the one provided by Microsoft Outlook
I have a need to implement a rating feature and would like to do
I need to implement an in-memory tuple-of-strings matching feature in C. There will be
Adding support for Unicode passwords it an important feature that should not be ignored
I want to implement a forgot-password feature in asp.net mvc that allows users to
So I need to implement an auto-logout feature for WordPress. With JavaScript this seems
We have a Swing application, currently I need to add a feature that is

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.