docker-registry-sync 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTFmYmM3YTUyNzBlZWU1NTYzNWJmOTlkMWM3MmE4NGFmYzQzMTcxYw==
4
+ MDc2ZTEzMjUwZWQzN2JjMWQ2YmE1NjFhZWFhMDNkM2M3NTY5YjExMg==
5
5
  data.tar.gz: !binary |-
6
- ZTA1MjY5Mjk4ZDRmY2FjNzllNDhiZmI2ZWQwMGU3OWU5MDM5NzZhYw==
6
+ OGE1NzIzODIyNjY4NjRkZTcyYTY0YzA5YjljOWViYzZlMWVjODhmYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Njk5YmU1MTY0MDFiMzMwNjU2NDI5ZWQzM2I2Mzc4YmIxNWQ2ODE4NDRmYTc1
10
- NWI1NDk2YmYyMTI4OGZjZDAwMWJhMTkzYWQ4ZTYwZmEwMWRiZDE1MzBiNjNm
11
- MzAwMThkN2NjNjViZDE1MTM3ZGEwNDJjYjdkNjRlZTE3M2U5YzA=
9
+ ZDE2YjMxNWJmYWYyNWRjZmFiZjRlOTRhZjAzZWVkZGU5MTIzNmU3MTEwNWMz
10
+ NmY2YmM3MTQ1MzRlOWJiMDAxOTg4NmQzZWUwMTQyNmFhYzNhNzNkYjIxMGU1
11
+ MTcwMTBiYmVmOTM5MjQyZjY1NjNkMGQ4Mzg0YzQ3MTlkNWExMWI=
12
12
  data.tar.gz: !binary |-
13
- NDViMDc2MjA2NmE3NzJkYzhiOTFlZmVlYTUyMWViZGY2NzBlZTQ1NjE2MWM2
14
- Nzc3ZWZjZjFmNDk4ZWI3YWUzOWE0NGZhNmUwZTlhNDI2OWYxMTJhNzUxY2M3
15
- MGQwZDM1Mzg3ZDI4OWE4NmIxNGQyY2FiYWZiZTRhZjZkNGY5ZDM=
13
+ NGYzYmMwYWZkOTc4ZjEzNWM3ZTJkNmY0ZDgyMWNhZWVjYmM5YzM0YjM3Njhj
14
+ MTA0MjA2ZTEwNzc4NjcxMGY2MDgxOWFhZWUzMWI0YmIyMzIyNzk3MzExNzYx
15
+ MTAwN2NlODRmYmU0MjY5ZjQ0N2Q2MGFkNmQwZGI2YjEwMjdmNWI=
@@ -50,15 +50,19 @@ module Docker
50
50
 
51
51
  Signal.trap('INT') do
52
52
  @config.logger.error 'Received INT signal...'
53
- @producer_finished = true
54
- @terminated = true
55
- @work_queue.clear
53
+ @threads.synchronize do
54
+ @producer_finished = true
55
+ @terminated = true
56
+ @work_queue.clear
57
+ end
56
58
  end
57
59
  Signal.trap('TERM') do
58
60
  @config.logger.error 'Received TERM signal...'
59
- @producer_finished = true
60
- @terminated = true
61
- @work_queue.clear
61
+ @threads.synchronize do
62
+ @producer_finished = true
63
+ @terminated = true
64
+ @work_queue.clear
65
+ end
62
66
  end
63
67
  end
64
68
 
@@ -77,7 +81,9 @@ module Docker
77
81
  end
78
82
 
79
83
  def finalize_workers
80
- @producer_finished = true
84
+ @threads.synchronize do
85
+ @producer_finished = true
86
+ end
81
87
  @consumer_thread.join
82
88
  @threads.each { |t| t.join unless t.nil? }
83
89
  @config.logger.info "Processing job results..."
@@ -114,7 +114,9 @@ module Docker
114
114
  if @config.source_sse
115
115
  opts[:copy_source_sse_customer_algorithm] = 'AES256'
116
116
  end
117
- @work_queue << opts
117
+ @threads.synchronize do
118
+ @work_queue << opts
119
+ end
118
120
  sleep 0.1
119
121
  end
120
122
  end
@@ -132,7 +134,9 @@ module Docker
132
134
  t_index = @threads.rindex { |t| t.nil? || t.status == false || t['finished'].nil? == false }
133
135
 
134
136
  begin
135
- opts = @work_queue.pop(true)
137
+ @threads.synchronize do
138
+ opts = @work_queue.pop(true)
139
+ end
136
140
  rescue ThreadError
137
141
  @config.logger.info "No work found on the queue, sleeping..."
138
142
  sleep 1
@@ -1,7 +1,7 @@
1
1
  module Docker
2
2
  module Registry
3
3
  module Sync
4
- VERSION = '0.2.9'
4
+ VERSION = '0.2.10'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-registry-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Oldfield