delayed_job_azure 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/delayed_job_azure.gemspec +1 -1
- data/lib/delayed/backend/worker.rb +13 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a1a60199830ad55f85a992d3232c0f8ce8e7a74
|
4
|
+
data.tar.gz: 123b8332930f6923d3d7b04dbd7db8047fe3c312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fd85f72746082b2e6c7be7322df4279516b542af67affea240e264d681db7568870260e9522cd42fddb8553d96a0c6a9e585592a01c45ed7b27308b8e47a21c
|
7
|
+
data.tar.gz: b2fefe21df31de6e6e61b7f7a984b3256c4551165bdc4363990234dd8e88ce7adfd230b3d2c1a7ecf533d2a157c1c3316462a1798149e1e2aadfa6f73d47cef1
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/delayed_job_azure.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "delayed_job_azure"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jordan Yaker", "Supportify, Inc."]
|
@@ -3,8 +3,8 @@ require_relative 'azure_config'
|
|
3
3
|
module Delayed
|
4
4
|
class Worker
|
5
5
|
class << self
|
6
|
-
attr_accessor :config, :
|
7
|
-
:
|
6
|
+
attr_accessor :config, :queue_name, :delay, :timeout,
|
7
|
+
:expires_in, :available_priorities
|
8
8
|
|
9
9
|
def configure
|
10
10
|
yield(config)
|
@@ -25,13 +25,20 @@ module Delayed
|
|
25
25
|
@config ||= AzureConfig.new
|
26
26
|
end
|
27
27
|
|
28
|
+
def azure
|
29
|
+
@azure ||= Azure::QueueService.new
|
30
|
+
end
|
31
|
+
|
32
|
+
def queues
|
33
|
+
unless @queues
|
34
|
+
@queues = Delayed::Worker.azure.list_queues
|
35
|
+
@queues.map! { |q| q.name }
|
36
|
+
end
|
37
|
+
@queues
|
38
|
+
end
|
28
39
|
end
|
29
40
|
end
|
30
41
|
end
|
31
42
|
|
32
|
-
Delayed::Worker.azure = Azure::QueueService.new
|
33
|
-
Delayed::Worker.queues = Delayed::Worker.azure.list_queues
|
34
|
-
Delayed::Worker.queues.map! { |q| q.name }
|
35
|
-
|
36
43
|
# initialize with defaults
|
37
44
|
Delayed::Worker.configure {}
|