ost_runner 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eee3e8bbf9917f4ef52aa897c4d5afb856a81ba5
4
- data.tar.gz: a6864c1952732f1a4520a014405548fdf67a282a
3
+ metadata.gz: c383f9bdd720589820f0410b6f11599d39602949
4
+ data.tar.gz: 69622ce95927d9db7ef05adffe760dba2f72e89c
5
5
  SHA512:
6
- metadata.gz: d81fd0ccc7e899b2c37cd01097520549efd1ab4757498de7ec16d681e4bb89a897c9f8dfe060b0edb280d660ac4c167f1fc5d63a46e3c5170d690f8be07562c8
7
- data.tar.gz: 1fa7d4b9d39fb281dae8fbbe69bf19b4098972f00517ab0c063bfd9268793a7ca967f1dc884d409c51c490163518722e2b895e5f7d06833511389a5dddcab43f
6
+ metadata.gz: cf3b06f7009f92b395e4145cc98968f6be00a72f39c182769971a8eecdfbecf36d10d50dffc902d1c9f5e7af9bd9e23323d38a280856fa0bcc3302e98bd5cb40
7
+ data.tar.gz: d919c8397d925f690e078f04b2dd60750638b2574f7f0094a58dc16bcea35c51851aa692187c9a2aecc1bdb986da722465f65c5ceebb25f63e289a4eac29c126
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OstRunner
2
2
 
3
3
  OstRunner is an ActiveJob QueueAdapter to run ActiveJob using my preferred
4
- queueing backend: Ost.
4
+ queueing backend: [Ost](https://github.com/soveran/ost).
5
5
 
6
6
  ## Installation
7
7
 
@@ -28,6 +28,20 @@ You can easily set your queuing backend:
28
28
  end
29
29
  ```
30
30
 
31
+ ## Run
32
+
33
+ There are three tasks to start/stop the runner:
34
+
35
+ ```ruby
36
+ rails ost_runner:start # Listens to and executes ActiveJob Ost jobs
37
+ rails ost_runner:start_as_daemon # Listens to and executes ActiveJob Ost jobs as a daemon
38
+ rails ost_runner:stop # Stops a worker running as a daemon
39
+ ```
40
+
41
+ ## Known issues
42
+
43
+ Exceptions are not caught
44
+
31
45
  ## Contributing
32
46
 
33
47
  Bug reports and pull requests are welcome on GitHub at https://github.com/srabuini/ost_runner. 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.
@@ -1,4 +1,5 @@
1
1
  require 'active_support'
2
+ require 'ost'
2
3
 
3
4
  module ActiveJob
4
5
  module QueueAdapters
@@ -16,11 +16,11 @@ namespace :ost_runner do
16
16
  end
17
17
 
18
18
  def queue
19
- ENV['ost_runner_queue'] || Rails.application.class.parent_name.downcase
19
+ ENV['OST_RUNNER_QUEUE'] || Rails.application.class.parent_name.downcase
20
20
  end
21
21
 
22
22
  def pool
23
- ENV['ost_runner_pool'] || 1
23
+ ENV['OST_RUNNER_POOL'] || 1
24
24
  end
25
25
 
26
26
  desc 'Listens to and executes ActiveJob Ost jobs'
@@ -1,3 +1,3 @@
1
1
  module OstRunner
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -1,3 +1,5 @@
1
+ require 'ost'
2
+
1
3
  module OstRunner
2
4
  class Worker
3
5
  attr_reader :queue_name, :size
@@ -1,3 +1,6 @@
1
+ libdir = File.join(File.dirname(__FILE__), 'lib')
2
+ $LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
3
+
1
4
  require 'ost_runner/version'
2
5
 
3
6
  Gem::Specification.new do |spec|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ost_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Rabuini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-17 00:00:00.000000000 Z
11
+ date: 2017-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ost
@@ -74,7 +74,6 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
- - Gemfile
78
77
  - Guardfile
79
78
  - LICENSE.txt
80
79
  - README.md
@@ -104,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
103
  version: '0'
105
104
  requirements: []
106
105
  rubyforge_project:
107
- rubygems_version: 2.5.2
106
+ rubygems_version: 2.6.13
108
107
  signing_key:
109
108
  specification_version: 4
110
109
  summary: ActiveJob Ost Worker
data/Gemfile DELETED
@@ -1,9 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activejob', require: false
4
- gem 'activesupport', require: false
5
- gem 'guard-minitest', require: false
6
- gem 'guard', require: false
7
- gem 'minitest-reporters', require: false
8
- gem 'rubocop', require: false
9
- gem 'rails', require: false