https://github.com/hashnuke/rabbitmq-graceful-exit
Test code to gracefully exit rabbitmq worker
https://github.com/hashnuke/rabbitmq-graceful-exit
Last synced: 10 months ago
JSON representation
Test code to gracefully exit rabbitmq worker
- Host: GitHub
- URL: https://github.com/hashnuke/rabbitmq-graceful-exit
- Owner: HashNuke
- Created: 2017-07-27T12:31:12.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-01T11:04:13.000Z (almost 9 years ago)
- Last Synced: 2025-02-05T21:58:41.272Z (over 1 year ago)
- Language: Ruby
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### Start workers
```
ruby run.rb
```
### To send messages
```
irb -r ./rabbit.rb
```
Code to send messages
```
r = Rabbit.new
r.post "hello"
(1..20).to_a.map {|i| r.post("hello #{i}")}
```
### Send signal to gracefully exit
```
kill -SIGUSR1
```