{"id":18832808,"url":"https://github.com/brandymint/unique_worker","last_synced_at":"2026-01-25T20:30:20.113Z","repository":{"id":136771989,"uuid":"147684257","full_name":"BrandyMint/unique_worker","owner":"BrandyMint","description":"Пробник UniqueWorker для sidekiq","archived":false,"fork":false,"pushed_at":"2019-04-02T06:58:18.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-30T07:23:15.510Z","etag":null,"topics":["gem","ruby","ruby-gem","sidekiq"],"latest_commit_sha":null,"homepage":null,"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/BrandyMint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-06T14:13:59.000Z","updated_at":"2019-04-11T11:01:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"586f1299-39a5-4f80-a073-29157b10af15","html_url":"https://github.com/BrandyMint/unique_worker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Funique_worker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Funique_worker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Funique_worker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BrandyMint%2Funique_worker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BrandyMint","download_url":"https://codeload.github.com/BrandyMint/unique_worker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239768926,"owners_count":19693763,"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":["gem","ruby","ruby-gem","sidekiq"],"created_at":"2024-11-08T01:59:03.890Z","updated_at":"2026-01-25T20:30:20.034Z","avatar_url":"https://github.com/BrandyMint.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UniqueWorker\n\n[![Build Status](https://travis-ci.org/BrandyMint/unique_worker.svg)](https://travis-ci.org/BrandyMint/unique_worker)\n\nМодуль предназначет для исключения ситуации\nкогда один воркер выполняется параллельно.\nВ большинстве случаев это не нужно и опасно (напирмер нет смысла параллельно генерировать новый valuta.xml)\nВ тоже время письма параллельно можно отправлять.\n\nМожно было бы применить схему один worker = одна очередь и ограничить ее одним job-ом\nно нам нет смысла держать job-ы в очереди, их надо просто исключать\n\nhttp://erik.debill.org/2016/08/07/sidekiq-queueing-patterns\n\nЭто пока сырой технический вариант. По-сути является надстройкой над RedLock. У него есть зависимость от Settings и от\nRails. Если испытания пройдут успешно, то нужно будет:\n\n1. Выделить настройки в configure модуля.\n2. Сделать возможность лочить любой метод и как следсвие отдельный helper для\n   worker-ов.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'unique_worker'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install unique_worker\n\n## Usage\n\n```\nclass GenerateCompositeStatusWorker                                                                                                                                                                                                       \n  include Sidekiq::Worker                                                                                                                                                                                                                                                                                                                 \n  prepend UniqueWorker  \n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/dapi/unique_worker. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the UniqueWorker project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/dapi/unique_worker/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandymint%2Funique_worker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandymint%2Funique_worker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandymint%2Funique_worker/lists"}