barbeque 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d8ea19bbd220b98605f95871ad681abf8c11a54
4
- data.tar.gz: fe4f3a6a80b869421b685bdbb01a45fa1b1ad756
3
+ metadata.gz: 4189910f9a93c337aa4baf8491098e3c5cfb0d83
4
+ data.tar.gz: 8d460cc32edf6f00514f2448b583ee0e5c857977
5
5
  SHA512:
6
- metadata.gz: 0fc831aca8cf0a60430e43d1c9b715f561d9f0686325f6847b1f15a975b940585b9698a6ebf074c3ef6f2461383e1ae75f7bffa568403df754211fc763d8a0ad
7
- data.tar.gz: 760760602562bbabe011865e6f1bc589a8d3ad4ee9bd444006187341035bb3080c4418c15ddcbc7ad5efae39820557247ebbab57ea1775e39bb9bc900cb9d8e6
6
+ metadata.gz: 7c50e0ef9258dd7b9fce1940dd4ef3d60d7b0eb29e6d9dc54456de19549c2ce45ccaf56f67f2487e43bb5394d3f026caae42964008e059796ecf3f1f1db4127a
7
+ data.tar.gz: 766e2abd01645473c086649441b3f3753a43e6f776d9ea49a28677f258102a60e63f37a557c356159caff8e2aa7b500b17db221ce4dee3726da7c8c04dc4bf7f
@@ -1,3 +1,3 @@
1
1
  module Barbeque
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  end
@@ -8,15 +8,23 @@ module Barbeque
8
8
 
9
9
  DEFAULT_QUEUE = 'default'
10
10
 
11
- def self.run
11
+ def self.run(
12
+ worker_type: 'process',
13
+ workers: 4,
14
+ daemonize: false,
15
+ log: $stdout,
16
+ log_level: :info,
17
+ pid_path: '/tmp/barbeque_worker.pid',
18
+ supervisor: true
19
+ )
12
20
  options = {
13
- worker_type: 'process',
14
- workers: (ENV['BARBEQUE_WORKER_NUM'] || 4).to_i,
15
- daemonize: ENV['DAEMONIZE_BARBEQUE'] == '1',
16
- log: Rails.env.production? ? Rails.root.join("log/barbeque_worker.log").to_s : $stdout,
17
- log_level: Rails.env.production? ? :info : :debug,
18
- pid_path: Rails.root.join('tmp/pids/barbeque_worker.pid').to_s,
19
- supervisor: Rails.env.production?,
21
+ worker_type: worker_type,
22
+ workers: workers,
23
+ daemonize: daemonize,
24
+ log: log,
25
+ log_level: log_level,
26
+ pid_path: pid_path,
27
+ supervisor: supervisor,
20
28
  }
21
29
 
22
30
  worker = ServerEngine.create(nil, Barbeque::Worker, options)
@@ -2,8 +2,15 @@ namespace :barbeque do
2
2
  desc 'Start worker to execute jobs'
3
3
  task worker: :environment do
4
4
  ENV['BARBEQUE_QUEUE'] ||= 'default'
5
-
6
5
  require 'barbeque/worker'
7
- Barbeque::Worker.run
6
+
7
+ Barbeque::Worker.run(
8
+ workers: (ENV['BARBEQUE_WORKER_NUM'] || 4).to_i,
9
+ daemonize: ENV['DAEMONIZE_BARBEQUE'] == '1',
10
+ log: ENV['BARBEQUE_LOG_TO_STDOUT'] == '1' ? $stdout : Rails.root.join('log/barbeque_worker.log').to_s,
11
+ log_level: Rails.env.production? ? :info : :debug,
12
+ pid_path: Rails.root.join('tmp/pids/barbeque_worker.pid').to_s,
13
+ supervisor: Rails.env.production?,
14
+ )
8
15
  end
9
16
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barbeque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-27 00:00:00.000000000 Z
11
+ date: 2016-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: adminlte2-rails