Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runlevel5/learning_resque
https://github.com/runlevel5/learning_resque
Last synced: about 9 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/runlevel5/learning_resque
- Owner: runlevel5
- Created: 2018-09-27T01:24:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-27T01:27:58.000Z (over 6 years ago)
- Last Synced: 2024-11-25T17:13:05.664Z (2 months ago)
- Language: Ruby
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A basic resque app with a sleeper worker
## Setup
`bundle install`
and run Redis
`docker-compose up -d`
## Configuration
Please set `REDIS_URL` UNIX environment variable if you want to use different Redis, by default it would use our Docker Redis which is `redis://localhost:6381`
## Run worker
Start a worker easily with:
```
$ QUEUE=test_worker PIDFILE=./resque.pid bundle exec rake environment resque:work
```Enqueue a job with:
```
$ irb
> require_relative './config/boot'
> Resque.enqueue(Sleeper,Kill the worker with:
```
$ kill `cat ./resque.pid`
```