Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5192881

Browse files
Ensure Queue is always present.
1 parent 72657b3 commit 5192881

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

‎CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.0.5] - 2021年06月28日
2+
3+
- Ensure Queue is always present.
4+
15
## [0.0.4] - 2021年06月28日
26

37
- Fix install rake bug. Non-Rails rake doc.

‎Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
lambda_punch (0.0.4)
4+
lambda_punch (0.0.5)
55
concurrent-ruby
66
rake
77
rb-inotify

‎lib/lambda_punch/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module LambdaPunch
2-
VERSION = "0.0.4"
2+
VERSION = "0.0.5"
33
end

‎lib/lambda_punch/worker.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def start!
1616
require 'timeout'
1717
require 'rb-inotify'
1818
DRb.start_service
19-
@queue=DRbObject.new_with_uri(Server.uri)
19+
new_drb_queue
2020
end
2121

2222
# Creates a new instance of this object with the event payload from the `LambdaPunch::Api#invoke`
@@ -31,6 +31,14 @@ def call(event_payload)
3131
#
3232
def queue
3333
@queue
34+
rescue DRb::DRbConnError
35+
new_drb_queue
36+
end
37+
38+
private
39+
40+
def new_drb_queue
41+
@queue = DRbObject.new_with_uri(Server.uri)
3442
end
3543

3644
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /