herdst_worker 0.1.15 → 0.1.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50cad009fea342f5f2147973c292ecf89fbbb65f983b33339b6c6855d0d8bda7
4
- data.tar.gz: f8fb82c44f454d776b6290253d61e3fe01aa0f31ee360850d5a0b0987f054d0a
3
+ metadata.gz: 1b45d2b8b64393572992a4434666e432d575d1e39a6ac58acd4df8f1e0b47093
4
+ data.tar.gz: 411618b99c38009946b4efd8a626c9c7d8ba98637b906e6d21ac1b01644b8b7a
5
5
  SHA512:
6
- metadata.gz: e3739b02330d9775b7730793ebdc1beffc29e65e4c799cb4a85be82491d972442165f1451d9c06a3877a307c5046dac007b5f2ab92a1c6d03b568131cf5f9d86
7
- data.tar.gz: d2e59aa54ef5d07ac44425757f63e99f32078ae3e91cd01a47d1f64d08dc27a51f8d8d04cb9d076be8b97106b957685ca8f338ec76c33abad97cc7bcd9e6e3fd
6
+ metadata.gz: b0594c4b157d7aa04cca531f90e91401006a85494033862b0f1b33bb184405292b827be25572175d89773cb597796864d977972982b2d6084ba8845cf222a902
7
+ data.tar.gz: 2147d0bfb758ca0dd69cc5c8e90ac36b993f05b6162d94cdc48c4de8ccd103af180844f3ca6469d2b056d7a03410f2afdaa6910d1b4cb4f0e71178235edaccdf
data/ReadMe.md ADDED
@@ -0,0 +1,5 @@
1
+ # Publishing
2
+
3
+ 1. Update version in `lib/herdst_worker/version.rb`
4
+ 2. run `gem build herdst_worker.gemspec`
5
+ 3. run `gem push gem push herdst_worker-x.x.x.gem`
@@ -74,7 +74,7 @@ module HerdstWorker
74
74
  )
75
75
 
76
76
  Aws.config.update(
77
- region: self.get_aws_region,
77
+ region: self.get_aws_region(credentials),
78
78
  credentials: self.aws_credentials
79
79
  )
80
80
 
@@ -82,10 +82,14 @@ module HerdstWorker
82
82
  end
83
83
 
84
84
 
85
- def get_aws_region
86
- # "ap-southeast-2"
85
+ def get_aws_region(credentials = nil)
86
+ default_region = "ap-southeast-2"
87
87
 
88
- self["AWS_REGION"] = (ENV["AWS_REGION"] || "us-east-1")
88
+ if self.is_prod?
89
+ self["AWS_REGION"] = (ENV["AWS_REGION"] || default_region)
90
+ else
91
+ self["AWS_REGION"] = credentials && credentials["Region"] || default_region
92
+ end
89
93
  end
90
94
 
91
95
 
@@ -217,7 +217,7 @@ module HerdstWorker
217
217
  private
218
218
  def reset_time
219
219
  self.start_time = Time.now.utc.to_i
220
- self.restart_time = self.start_time + (3600) # One hour
220
+ self.restart_time = self.start_time + (3600 * 6) # Four hours
221
221
  end
222
222
 
223
223
  end
@@ -1,3 +1,3 @@
1
1
  module HerdstWorker
2
- VERSION = '0.1.15'
2
+ VERSION = '0.1.17'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: herdst_worker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Herd.St
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-21 00:00:00.000000000 Z
11
+ date: 2023-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -230,6 +230,7 @@ extensions: []
230
230
  extra_rdoc_files: []
231
231
  files:
232
232
  - Rakefile
233
+ - ReadMe.md
233
234
  - bin/herdst_worker
234
235
  - bin/herdst_worker_console
235
236
  - lib/herdst_worker.rb