https://github.com/vgsantoniazzi/gps-job
gps-job — A Google Pub/Sub Adapter for ActiveJob
https://github.com/vgsantoniazzi/gps-job
activejob google-pub worker workers
Last synced: 9 months ago
JSON representation
gps-job — A Google Pub/Sub Adapter for ActiveJob
- Host: GitHub
- URL: https://github.com/vgsantoniazzi/gps-job
- Owner: vgsantoniazzi
- License: mit
- Created: 2018-02-04T04:06:40.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-22T17:53:00.000Z (over 7 years ago)
- Last Synced: 2025-02-12T04:41:52.941Z (9 months ago)
- Topics: activejob, google-pub, worker, workers
- Language: Ruby
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# Google Pub/Sub job
Google Cloud Pub/Sub adapter and worker for ActiveJob.
## Usage
```ruby
gem 'gps-job'
```
First, change the ActiveJob backend.
``` ruby
require 'gps/job/adapter'
Rails.application.config.active_job.queue_adapter = :google_cloud_pubsub
```
Start the worker
``` sh
$ rake gps:worker
```
Write the Job class and code to use it.
``` ruby
class MyJob < ApplicationJob
def perform(name)
puts "How are you?"
end
end
```
## Google Pub/Sub Emulator
https://cloud.google.com/pubsub/docs/emulator
``` sh
$ gcloud beta emulators pubsub start
```
## Contributing
``` sh
$ bin/setup
```
I :heart: Open source!
[Follow github guides for forking a project](https://guides.github.com/activities/forking/)
[Follow github guides for contributing open source](https://guides.github.com/activities/contributing-to-open-source/#contributing)
## Code Status
[](https://travis-ci.org/vgsantoniazzi/gps-job)
## License
Gem is released under the [MIT license](http://opensource.org/licenses/MIT).