eventq_base 0.1.7 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eventq_base.rb +10 -9
- data/lib/eventq_base/event_raised_exchange.rb +6 -4
- data/lib/eventq_base/event_raised_queue.rb +6 -4
- data/lib/eventq_base/eventq_client_contract.rb +9 -0
- data/lib/eventq_base/exchange.rb +5 -3
- data/lib/eventq_base/message_args.rb +12 -0
- data/lib/eventq_base/queue.rb +14 -12
- data/lib/eventq_base/queue_message.rb +11 -9
- data/lib/eventq_base/queue_worker_contract.rb +23 -0
- data/lib/eventq_base/subscription_manager_contract.rb +13 -0
- data/lib/eventq_base/version.rb +1 -1
- metadata +14 -14
- data/lib/eventq_base/eventq_client.rb +0 -7
- data/lib/eventq_base/queue_worker.rb +0 -20
- data/lib/eventq_base/subscription_manager.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cacecc1f7bf0edd18550582340b11ab229b06a88
|
4
|
+
data.tar.gz: d7c62b57ec15a60cb185507c17dd7d8d4507fc68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60ba2868d29385675776bd8a99aabc3f67fee287a6d487054a99ad2a2a9c56478b8ad3e0bdeab3da7044ecbc6bca9c86ae630518ac03e8704312fd762fc491e5
|
7
|
+
data.tar.gz: 6425de9a3c46d5851d897056fb10787e22a180752e86301ac3f36042c5d0a899d7e8d91f8a5fb4b80abee591975003526e619aa204dd9e304a9590ad889e2f1a
|
data/lib/eventq_base.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
require_relative '
|
2
|
-
require_relative '
|
3
|
-
require_relative '
|
4
|
-
require_relative '
|
5
|
-
require_relative '
|
6
|
-
require_relative '
|
7
|
-
require_relative '
|
8
|
-
require_relative '
|
9
|
-
require_relative '
|
1
|
+
require_relative 'eventq_base/version'
|
2
|
+
require_relative 'eventq_base/queue'
|
3
|
+
require_relative 'eventq_base/exchange'
|
4
|
+
require_relative 'eventq_base/queue_message'
|
5
|
+
require_relative 'eventq_base/message_args'
|
6
|
+
require_relative 'eventq_base/queue_worker_contract'
|
7
|
+
require_relative 'eventq_base/event_raised_exchange'
|
8
|
+
require_relative 'eventq_base/event_raised_queue'
|
9
|
+
require_relative 'eventq_base/subscription_manager_contract'
|
10
|
+
require_relative 'eventq_base/eventq_client_contract'
|
data/lib/eventq_base/exchange.rb
CHANGED
data/lib/eventq_base/queue.rb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module EventQ
|
2
|
+
class Queue
|
3
|
+
attr_accessor :name
|
4
|
+
attr_accessor :allow_retry
|
5
|
+
attr_accessor :retry_delay
|
6
|
+
attr_accessor :max_retry_attempts
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
def initialize
|
9
|
+
@allow_retry = false
|
10
|
+
#default retry delay is 30 seconds
|
11
|
+
@retry_delay = 30000
|
12
|
+
#default max retry attempts is 5
|
13
|
+
@max_retry_attempts = 5
|
14
|
+
end
|
13
15
|
end
|
14
|
-
end
|
16
|
+
end
|
@@ -1,11 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
module EventQ
|
2
|
+
class QueueMessage
|
3
|
+
attr_accessor :retry_attempts
|
4
|
+
attr_accessor :type
|
5
|
+
attr_accessor :content
|
6
|
+
attr_accessor :created
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
def initialize
|
9
|
+
@retry_attempts = 0
|
10
|
+
@created = DateTime.now
|
11
|
+
end
|
10
12
|
end
|
11
|
-
end
|
13
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module EventQ
|
2
|
+
# Contract class for queue workers
|
3
|
+
class QueueWorkerContract
|
4
|
+
|
5
|
+
def start(queue, options = {}, &block)
|
6
|
+
|
7
|
+
end
|
8
|
+
|
9
|
+
def stop
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def on_retry_exceeded(&block)
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
def running?
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
data/lib/eventq_base/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventq_base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaughanbrittonsage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.11'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
description: This gem contains the base classes and contracts required by any eventq
|
@@ -48,16 +48,17 @@ extra_rdoc_files: []
|
|
48
48
|
files:
|
49
49
|
- bin/console
|
50
50
|
- bin/setup
|
51
|
-
- lib/eventq_base.rb
|
52
51
|
- lib/eventq_base/event_raised_exchange.rb
|
53
52
|
- lib/eventq_base/event_raised_queue.rb
|
54
|
-
- lib/eventq_base/
|
53
|
+
- lib/eventq_base/eventq_client_contract.rb
|
55
54
|
- lib/eventq_base/exchange.rb
|
55
|
+
- lib/eventq_base/message_args.rb
|
56
56
|
- lib/eventq_base/queue.rb
|
57
57
|
- lib/eventq_base/queue_message.rb
|
58
|
-
- lib/eventq_base/
|
59
|
-
- lib/eventq_base/
|
58
|
+
- lib/eventq_base/queue_worker_contract.rb
|
59
|
+
- lib/eventq_base/subscription_manager_contract.rb
|
60
60
|
- lib/eventq_base/version.rb
|
61
|
+
- lib/eventq_base.rb
|
61
62
|
homepage: https://github.com/vaughanbrittonsage/eventq
|
62
63
|
licenses:
|
63
64
|
- MIT
|
@@ -68,19 +69,18 @@ require_paths:
|
|
68
69
|
- lib
|
69
70
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
71
|
requirements:
|
71
|
-
- -
|
72
|
+
- - '>='
|
72
73
|
- !ruby/object:Gem::Version
|
73
74
|
version: '0'
|
74
75
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
76
|
requirements:
|
76
|
-
- -
|
77
|
+
- - '>='
|
77
78
|
- !ruby/object:Gem::Version
|
78
79
|
version: '0'
|
79
80
|
requirements: []
|
80
81
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
82
|
+
rubygems_version: 2.0.14.1
|
82
83
|
signing_key:
|
83
84
|
specification_version: 4
|
84
85
|
summary: This gem contains the base classes and contracts required by any eventq implementations.
|
85
86
|
test_files: []
|
86
|
-
has_rdoc:
|