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 5978329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:30:00+00:00 2026-05-22T21:30:00+00:00

I have a scraper set up to use delayed_job so that it runs in

  • 0

I have a scraper set up to use delayed_job so that it runs in the background.

class Scraper
  def do_scrape
    # do some scraping stuff
  end
  handle_asynchronously :do_scrape
end

Now I can comment out the handle_asynchronously line, open the console and run the scraper just fine. It does exactly what I expect it to do.

However, when I try to fire the scrape as a delayed job, it doesn’t seem to do anything at all. Further to that, it doesn’t seem to log anything important either.

Here’s how my log looks from enqueueing a job to running rake jobs:work.

County Load (1.0ms)  SELECT "counties".* FROM "counties" WHERE "counties"."name" = 'Fermanagh' LIMIT 1
   (0.1ms)  BEGIN
  SQL (20.5ms)  INSERT INTO "delayed_jobs" ("attempts", "created_at", "failed_at", "handler", "last_error", "locked_at", "locked_by", "priority", "run_at", "updated_at") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10) RETURNING "id"  [["attempts", 0], ["created_at", Mon, 30 May 2011 21:19:25 UTC +00:00], ["failed_at", nil], ["handler", "--- 

# serialized object omitted for conciseness

nmethod_name: :refresh_listings_in_the_county_without_delay\nargs: []\n\n"], ["last_error", nil], ["locked_at", nil], ["locked_by", nil], ["priority", 0], ["run_at", Mon, 30 May 2011 21:19:25 UTC +00:00], ["updated_at", Mon, 30 May 2011 21:19:25 UTC +00:00]]
   (0.9ms)  COMMIT
  Delayed::Backend::ActiveRecord::Job Load (0.4ms)  SELECT "delayed_jobs".* FROM "delayed_jobs" WHERE (locked_by = 'host:David-Tuites-MacBook-Pro.local pid:7743' AND locked_at > '2011-05-30 17:19:32.116511') LIMIT 1
   (0.1ms)  BEGIN
  SQL (0.3ms)  DELETE FROM "delayed_jobs" WHERE "delayed_jobs"."id" = $1  [["id", 42]]
   (0.4ms)  COMMIT

As you can see, it seems to just inset a job and then delete it straight away? This scraping method should take at least a few minutes.

The worst part is, it was working perfectly last night and I can’t think of a single thing I’m doing differently. I tried fixing the gem to a previous version incase it was updated recently but doesn’t seem to have fixed the problem.

Any ideas?

  • 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-22T21:30:01+00:00Added an answer on May 22, 2026 at 9:30 pm

    Have you configured your delayed job to delete failed jobs? Look for the following setting in your initializer:
    Delayed::Worker.destroy_failed_jobs = true

    If yes then set it to false and look into the delayed_jobs table for the exception due to which it failed and debug further.

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

Sidebar

Related Questions

I have a scraper that is collecting some data from elsewhere that I have
I have a scraper, which queries different websites. Some of them varyingly use Content-Encoding.
We are using a web scraper and have it set up to have a
I'm scraping data from the web, and I have several processes of my scraper
I have a PHP scraper script which I use to scrape a page on
I use the smarty template engine and I have placed some Facebook meta tags
(Using collectiveidea's delayed_job) I have a job that scrapes for a keyword, but I
I have a scraper that downloads favicons I now download the icon, then do
I have this interface and a class implementing it: interface Scraper { string DateToUrl(DateTime
I currently have a script that scrapes proxies off websites, but I'm just wondering

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.