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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:15:12+00:00 2026-05-27T16:15:12+00:00

Trying to get delayed_job working with a mongoid backend. The created job fails to

  • 0

Trying to get delayed_job working with a mongoid backend. The created job fails to run, apparently because it is being pushed to the db.entries collection, rather than the db.delayed_backend_mongoid_jobs collection.

Given the following code in the class Entry:

after_create :create_dj
def create_dj
  Rails.logger.info "ENTRY CREATED at #{created_at}"
end
handle_asynchronously :create_dj, run_at: Proc.new { 30.seconds.from_now }

I would expect a new delayed_job entry would be created in the delayed_backend_mongoid_jobs collection. Instead, I see the following db log:

MONGODB health_blog_development['entries'].insert([
  {"content"=>"foo", "_id"=>BSON::ObjectId('4ee95ed3b643988551000044') ... }, 
  {"priority"=>0, "attempts"=>0, "handler"=>"--- !ruby/struct:Delayed::PerformableMethod ... }])

as if it thinks it should be pushing the job to the entries collection.

Some details that might be relevant:

  • Entry has been subclassed. I’ve tried the code in Entry and its subclass, TextEntry.
  • The function runs find when handle_asynchronously is not being used.
  • Entry is not an embedded class, but does have several referenced relations.
  • I’ve set config.mongoid.preload_models = true
  • I have confirmed that delayed_job works as expected when I use it with a new model in the same project.

Gems used:

  • mongoid (2.2.4)
  • rails (3.0.9)
  • delayed_job (2.1.4)
  • delayed_job_mongoid (1.0.4)

Please let me know if there’s any other details that might help figure out what’s going on here. Cheers!

  • 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-27T16:15:13+00:00Added an answer on May 27, 2026 at 4:15 pm

    This appears to be funny behaviour resulting from the combination of delayed_job and the Apotomo widget framework. Changing the process to use regular Rails forms rather than the Apotomo url_for_event process solves the issue.

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

Sidebar

Related Questions

I am trying to get delayed_job working as a windows service. I am so
I am trying to run django on my ubuntu lucid, but I get the
Trying to get a value from a object isn't working out. class Asset <
I'm trying to get a progress bar going with delayed job but I don't
I'm trying to get delayed job to work as a rake task, but for
I'm trying to do this with delayed_job and HTTParty : HTTParty.delay.get('http://example.com') It successfully saves
I am trying to use delayed_job on heroku and I get the following error:
I am trying get my first simple project in rails to run. I have
So i am trying get 2 div-containers which both should contain centered text (Both
I'm trying get the visible portion of UIImage from an UIImageView . UIImageView takes

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.