right_chimp 2.1.25 → 2.1.25.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c548668e38fd58794b473964f7ba204a7e75892
4
- data.tar.gz: 195e3977c81913af9ffd816f607901fa83150557
3
+ metadata.gz: fa843d882c4a5c39bfafdf3f2471e04f53e371ea
4
+ data.tar.gz: 363785ffdfcd920a0185e2a794529a8a00022050
5
5
  SHA512:
6
- metadata.gz: bec51a0eea3e14118a9a72f6df1218339ffc0885c127e34fe0c6574c8e422c8857bd3e3a8b440fe47fa12bdde8810323c42baf19cf55c0b5dc706cecfcead239
7
- data.tar.gz: 0445c453033f4371afc70d7e2a8ada37bb7e51e3de8e358577719d275f57daa3556dde1d898348f851dbabc2672a91b3f570bf5a132a36cbb6546705bc4ea77a
6
+ metadata.gz: 0e637dea1de6011ca328a5d0300c611b68d3485949235b6bb388a2efca96485c4e1db8fab8901d4cf1be1c6988d441ad0f19edc46683512770fd423b8eb1a798
7
+ data.tar.gz: 853b8db1c921c869d70a2c2bdae364ecdffb1e13ecf4b2b1eec777151feb8c3128ac5f9ad8862481c62e0aa310cd10ceb6660371522bf87addcf04a2b2bf32a8
data/CHANGES CHANGED
@@ -1,6 +1,11 @@
1
+ Version 2.1.25.1
2
+ --------------
3
+ * Bugfix: Fixed standalone execution (without chimpd)
4
+
1
5
  Version 2.1.25
2
6
  --------------
3
- * Bugfix: Fixed some corner case race conditions that affected the proper tracking of processing tasks.
7
+ * Bugfix: Fixed some corner case race conditions that affected the proper tracking of processing tasks.
8
+
4
9
  Version 2.1.24
5
10
  --------------
6
11
  * Feature: We now ensure jobs are added and tracked into the processing status before sending a 200 back to
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- right_chimp (2.1.25)
4
+ right_chimp (2.1.25.2)
5
5
  highline (~> 1.7.2)
6
6
  nokogiri (~> 1.6.7.1)
7
7
  progressbar (~> 0.11.0)
@@ -19,7 +19,7 @@ GEM
19
19
  domain_name (0.5.20160826)
20
20
  unf (>= 0.0.5, < 1.0.0)
21
21
  highline (1.7.8)
22
- http-cookie (1.0.2)
22
+ http-cookie (1.0.3)
23
23
  domain_name (~> 0.5)
24
24
  json (1.8.3)
25
25
  method_source (0.8.2)
@@ -27,20 +27,25 @@ module Chimp
27
27
 
28
28
  work_item.retry_count = @retry_count
29
29
  work_item.owner = Thread.current.object_id
30
+
30
31
  ChimpDaemon.instance.semaphore.synchronize do
31
32
  # remove from the processing queue
32
- Log.debug 'Decreasing processing counter (' + (ChimpDaemon.instance.proc_counter-1).to_s + ') for [' + job_uuid + '] group: ' + group.to_s
33
- ChimpDaemon.instance.queue.processing[group][job_uuid.to_sym] -= 1
34
- Log.debug ChimpDaemon.instance.queue.processing[group].inspect
35
- if ChimpDaemon.instance.queue.processing[group][job_uuid.to_sym] == 0
36
- Log.debug 'Completed processing task ' + job_uuid
37
- ChimpDaemon.instance.queue.processing[group].delete(job_uuid.to_sym)
38
- Log.debug ChimpDaemon.instance.queue.processing.inspect
33
+ Log.debug 'Decreasing processing counter (' + (ChimpDaemon.instance.proc_counter-1).to_s + ') for [' + job_uuid.to_s + '] group: ' + group.to_s
34
+ # only do this if we are running with chimpd
35
+ if ChimpDaemon.instance.queue.processing[group].nil?
36
+ # no op
39
37
  else
40
- Log.debug 'Still counting down for ' + job_uuid
38
+ ChimpDaemon.instance.queue.processing[group][job_uuid.to_sym] -= 1
39
+ Log.debug ChimpDaemon.instance.queue.processing[group].inspect
40
+ if ChimpDaemon.instance.queue.processing[group][job_uuid.to_sym] == 0
41
+ Log.debug 'Completed processing task ' + job_uuid.to_s
42
+ ChimpDaemon.instance.queue.processing[group].delete(job_uuid.to_sym)
43
+ Log.debug ChimpDaemon.instance.queue.processing.inspect
44
+ else
45
+ Log.debug 'Still counting down for ' + job_uuid.to_s
46
+ end
47
+ ChimpDaemon.instance.proc_counter -= 1
41
48
  end
42
-
43
- ChimpDaemon.instance.proc_counter -= 1
44
49
  end
45
50
 
46
51
  work_item.run
@@ -1,3 +1,3 @@
1
1
  module Chimp
2
- VERSION = "2.1.25"
2
+ VERSION = "2.1.25.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: right_chimp
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.25
4
+ version: 2.1.25.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - RightScale Operations