{"id":19052509,"url":"https://github.com/collectiveidea/delayed_job_mongoid","last_synced_at":"2025-05-16T07:04:45.957Z","repository":{"id":1057055,"uuid":"889878","full_name":"collectiveidea/delayed_job_mongoid","owner":"collectiveidea","description":"Mongoid backend for delayed_job","archived":false,"fork":false,"pushed_at":"2022-04-04T17:46:16.000Z","size":127,"stargazers_count":170,"open_issues_count":1,"forks_count":120,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-09T04:14:16.053Z","etag":null,"topics":["delayed-job","mongoid","mongoid-plugin"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/collectiveidea.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-09-05T18:42:00.000Z","updated_at":"2025-02-25T13:35:36.000Z","dependencies_parsed_at":"2022-07-06T04:02:23.311Z","dependency_job_id":null,"html_url":"https://github.com/collectiveidea/delayed_job_mongoid","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collectiveidea%2Fdelayed_job_mongoid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collectiveidea%2Fdelayed_job_mongoid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collectiveidea%2Fdelayed_job_mongoid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/collectiveidea%2Fdelayed_job_mongoid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/collectiveidea","download_url":"https://codeload.github.com/collectiveidea/delayed_job_mongoid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485055,"owners_count":22078767,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["delayed-job","mongoid","mongoid-plugin"],"created_at":"2024-11-08T23:26:49.210Z","updated_at":"2025-05-16T07:04:40.947Z","avatar_url":"https://github.com/collectiveidea.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DelayedJob Mongoid backend\n\n[![Gem Version][gem-img]][gem-url]\n[![Build Status][ghactions-img]][ghactions-url]\n[![Code Climate][codeclimate-img]][codeclimate-url]\n[![Coverage][coveralls-img]][coveralls-url]\n\n## Requirements\n\nDelayed Job Mongoid supports the following dependency versions:\n\n- Ruby 2.3+\n- Mongoid 5+\n\nFor Mongoid 3 and 4, use 2.x version of this gem.\n\n## Installation\n\nAdd the gem to your Gemfile:\n\n```ruby\ngem 'delayed_job_mongoid'\n```\n\nThen create the indexes (don't forget to do this in production):\n\n```\nscript/rails runner 'Delayed::Backend::Mongoid::Job.create_indexes'\n```\n\nTo generate `script/delayed_job`:\n\n```\nrails generate delayed_job\n```\n\nThat's it. Use [delayed_job](http://github.com/collectiveidea/delayed_job) as normal.\n\n## Advanced Usage\n\n### Silencing Noisy Logging\n\nBy default, the Mongo Ruby Driver will print log lines every\n5 seconds as Delayed Job polls your database. Use the following\nplugin to silence logs which happen while polling (except `error`\nlevel) and only log operations which happen during job execution.\n\n```ruby\n# in initializers/delayed_job.rb\n\nrequire 'delayed/plugins/mongo_silencer'\nDelayed::Worker.plugins \u003c\u003c Delayed::Plugins::MongoSilencer\n```\n\nTo ensure thread safety, this plugin requires your `Mongo::Logger.logger`\nto be an instance of `ActiveSupport::Logger` class. It will ignore instances\nof the Ruby standard library `Logger` class.\n\n### Customizing Job Class\n\nDelayed Job allows specifying a custom backend class for jobs.\nFor example, you may wish to specify a different database\ncollection name. To do this:\n\n```ruby\n# in an initializer\n\nclass MyJob\n  include ::Mongoid::Document\n\n  store_in(collection: :my_jobs)\n\n  include ::Delayed::Backend::Mongoid::Mixin\nend\n\nDelayed::Worker.backend = MyJob\n\n# in your application\n\nMyJob.enqueue(job_object)\n```\n\n[gem-img]: https://badge.fury.io/rb/delayed_job_mongoid.svg\n[gem-url]: https://rubygems.org/gems/delayed_job_mongoid\n[ghactions-img]: https://github.com/collectiveidea/delayed_job_mongoid/actions/workflows/test.yml/badge.svg?query=branch%3Amaster\n[ghactions-url]: https://github.com/collectiveidea/delayed_job_mongoid/actions/workflows/test.yml?query=branch%3Amaster\n[codeclimate-img]: https://codeclimate.com/github/collectiveidea/delayed_job_mongoid.svg\n[codeclimate-url]: https://codeclimate.com/github/collectiveidea/delayed_job_mongoid\n[coveralls-img]: https://coveralls.io/repos/github/collectiveidea/delayed_job_mongoid/badge.svg?branch=master\n[coveralls-url]: https://coveralls.io/github/collectiveidea/delayed_job_mongoid?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollectiveidea%2Fdelayed_job_mongoid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcollectiveidea%2Fdelayed_job_mongoid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcollectiveidea%2Fdelayed_job_mongoid/lists"}