fourkites-sqspoller 0.1.12.23 → 0.1.12.24
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 +8 -8
- data/lib/sqspoller/message_delegator.rb +5 -6
- data/sqspoller.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
YjRhNmRkYjQ1NWUwZWNkNDY1MzNjNDMwYjkwMDY0MTdiNzY3NjFhNw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
MjQ2NWYzYTJmNjRjMGYxMWJjOTU0MGU2NDEzZTE0NDY2NmE5MWY2OA==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NDQxMGZjMTZiYzMyZWRmYzMwOTBhZTNhMDk0YWQ4NmRhZmIxNzM2YmY4ZjUw
|
|
10
|
+
YTc5MDE4NWE5ZDVkNzBjZDk1ZGQ5M2VlMTI1NmU5Y2JlODhjZGQ2MTA3NDMx
|
|
11
|
+
MTc5YzFmZmNmYjUzM2U2YTc5ZGYxMDBlMTYxYmExNGVkY2Y1NTQ=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
NjE5NGE1OWExYmZlZmQ3YjY3ZTc2NzM2ZmJiZGQ3ZDE4ZGI3M2U1ZDAzMmUw
|
|
14
|
+
ZTdiMjEzNDllNjBmMzY2YjM1NjkxYWUxNWQ2N2ViMDc4NjNhNDJjZTNmMmE5
|
|
15
|
+
ZDdiMGMxY2UyMjYzNjhiYzliOTczZWM2ZjhhMjYyZjVlNzA1MTc=
|
|
@@ -22,28 +22,27 @@ module Sqspoller
|
|
|
22
22
|
def process(queue_controller, message, queue_name)
|
|
23
23
|
@semaphore.synchronize {
|
|
24
24
|
@pending_schedule_tasks +=1
|
|
25
|
-
if @
|
|
25
|
+
if @pending_schedule_tasks >= @max_allowed_queue_size
|
|
26
26
|
@logger.info "Entered wait state, connection_pool size reached max threshold, pending_schedule_tasks=#{@pending_schedule_tasks}"
|
|
27
|
-
while @connection_pool.queue_length > @worker_thread_pool_size || @
|
|
27
|
+
while @connection_pool.queue_length > @worker_thread_pool_size || @pending_schedule_tasks >= @max_allowed_queue_size
|
|
28
28
|
sleep(0.01)
|
|
29
29
|
end
|
|
30
30
|
@logger.info "Exiting wait state, connection_pool size reached below worker_thread_pool_size, pending_schedule_tasks=#{@pending_schedule_tasks}"
|
|
31
31
|
end
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
@logger.info "Scheduling worker task for message: #{message.message_id}"
|
|
33
|
+
@logger.info "Scheduling worker task for message: #{message.message_id}"
|
|
35
34
|
|
|
35
|
+
begin
|
|
36
36
|
@connection_pool.post do
|
|
37
37
|
begin
|
|
38
38
|
@logger.info "Starting worker task for message: #{message.message_id}"
|
|
39
39
|
@worker_task.process(message.body, message.message_id)
|
|
40
|
-
@pending_schedule_tasks -= 1
|
|
41
40
|
@logger.info "Finished worker task for message: #{message.message_id}"
|
|
42
41
|
queue_controller.delete_message message.receipt_handle
|
|
43
42
|
rescue Exception => e
|
|
44
|
-
@pending_schedule_tasks -= 1
|
|
45
43
|
@logger.info "Caught error for message: #{message}, error: #{e.message}, #{e.backtrace.join("\n")}"
|
|
46
44
|
end
|
|
45
|
+
@pending_schedule_tasks -= 1
|
|
47
46
|
end
|
|
48
47
|
rescue Concurrent::RejectedExecutionError => e
|
|
49
48
|
@pending_schedule_tasks -= 1
|
data/sqspoller.gemspec
CHANGED