Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/delayed-plugins-restarter
https://github.com/kanety/delayed-plugins-restarter
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/delayed-plugins-restarter
- Owner: kanety
- License: mit
- Created: 2017-05-02T06:31:46.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-02T06:32:26.000Z (over 7 years ago)
- Last Synced: 2024-12-25T04:04:42.526Z (23 days ago)
- Language: Ruby
- Size: 5.86 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Delayed::Plugins::Restarter
This plugin checks memory usage of a worker process after performing every jobs.
If the worker process exceeds max memory, it will stop and execute restart command automatically.## Requirements
* ruby 2.0+
* delayed_job 4.0+## Installation
$ gem install delayed-plugins-restarter
## Usage
Put your setting in config/initializers directory:
```ruby
Delayed::Worker.plugins << Delayed::Plugins::Restarter::Callback
Delayed::Plugins::Restarter.max_memory = 512
```Options:
* max_memory: max memory of a worker process in MB
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/kanety/delayed-plugins-restarter. 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.
## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).