docker-registry-sync 0.2.6 → 0.2.7

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
- ZWZmODVjYTA2ZmRkZmE3ZjIxMDVkY2IzMGExNDgxOGE2OWMwMzg5ZA==
4
+ MjgzYWMwMGEwZGMyMjRkZWJjZWVhZmU5NDk4MTczZjE3MmQ2MzliZQ==
5
5
  data.tar.gz: !binary |-
6
- ZjdlMTUwN2Q1YTkxNDEyNDg2NWVkYTY1NTAyMmQyMjhjYTk5NmMyZg==
6
+ ODBhOGFmMWRmNDhlNzVkYmI0MDg0MTdkY2YzZmVjYWFhOGIwMjZhYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjUyOGQwMTViZmNmZmY4ZDE2OGM3YjY0YzRlMTVmNDNjMDA5ZGMwOGE2YTg5
10
- MzUxY2QwNDFiNWM2OGM3NWJkMTExZDg4ZDY3NmFhZGM0ZjdhY2Q0MGNmMTk1
11
- NWJmNDRlM2VmYWZiYTZkYTRhNDkzMDhlMzFiMjcxZDA0ZDVlZmY=
9
+ MWM1MzQyNDU5Zjg2MzNhYTMzNjEwZDQ2ZTAxNDc1ODgzMjFiNjlmYmUyMDU4
10
+ Y2Y5OWRlNDI0NWMwYjgxMDcwNDc0ODIzZTVhNjllMzI3YzM5NWM3MWZjMDc0
11
+ YzA5YzFhNTAyOTc4ZjEwNThkNGYwZWZkOTNlOGEwZTA3ZDhjZjU=
12
12
  data.tar.gz: !binary |-
13
- Mjg5ZDFmNDYwNGVhNWQyYmYwYTBkNGRhMjc5M2FhZmM2ODg1YmVjMWE4NWZk
14
- MWIxMjAwMTAwYjgyNmFjZjRlNjAwNjQwYjg0ZDhjYTFkNjFhYjAyZGFmNDZl
15
- OTM1YzQwYzQ3NTRkMDgxMWUyYmNkYWEzOWM4YzIxYWE2ODlmZWE=
13
+ MzlmOGYxYjhkNWU4YjFjNmNhYWQ2OThlYjRiNGQ4ODg5N2RhYTQzZjljNTI4
14
+ OWIxNjllNTRjNzI2NmMzZjVhYzQ2OTllZjJiYTIwYmY2Y2ZhMWIwNGVkMTY1
15
+ ZmRkNzRjNDg5Yzk0MmNjYjMxNDY2NTAzZTMyYzk3YTQyMjhmNzA=
@@ -75,7 +75,6 @@ module Docker
75
75
  end
76
76
 
77
77
  def finalize_workers
78
- return true
79
78
  @producer_finished = true
80
79
  @consumer_thread.join
81
80
  @threads.each { |t| t.join unless t.nil? }
@@ -130,7 +129,6 @@ module Docker
130
129
  def run_sync
131
130
  ec = 1
132
131
  configure_signal_handlers
133
- start_workers
134
132
  begin
135
133
  @config.logger.info 'Polling queue for images to sync...'
136
134
  sqs = Aws::SQS::Client.new(region: @config.sqs_region)
@@ -147,6 +145,7 @@ module Docker
147
145
  @config.logger.info "Image sync data: #{data}"
148
146
 
149
147
  if image_exists?(data['image'], data['target']['bucket'], data['target']['region'])
148
+ start_workers
150
149
  @config.logger.info("Syncing tag: #{data['image']}:#{data['tag']} to #{data['target']['region']}:#{data['target']['bucket']}")
151
150
  success = sync_tag(data['image'], data['tag'], data['target']['bucket'], data['target']['region'], data['target']['sse'], data['source']['bucket'], data['source']['region'])
152
151
  success &&= finalize_workers
@@ -158,6 +157,7 @@ module Docker
158
157
  @config.logger.info("Falied to sync tag, leaving on queue: #{data['image']}:#{data['tag']} to #{data['target']['region']}:#{data['target']['bucket']}")
159
158
  end
160
159
  else
160
+ start_workers
161
161
  success = sync_repo(data['image'], data['target']['bucket'], data['target']['region'], data['target']['sse'], data['source']['bucket'], data['source']['region'])
162
162
  success &&= finalize_workers
163
163
  @config.logger.info("Syncing image: #{data['image']} to #{data['target']['region']}:#{data['target']['bucket']}")
@@ -1,7 +1,7 @@
1
1
  module Docker
2
2
  module Registry
3
3
  module Sync
4
- VERSION = '0.2.6'
4
+ VERSION = '0.2.7'
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.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Oldfield