web47core 3.2.3.40 → 3.2.3.42
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 +4 -4
- data/app/controllers/status_controller.rb +30 -16
- data/lib/app/jobs/cron/server.rb +1 -150
- data/lib/app/models/concerns/aws_configuration.rb +6 -2
- data/lib/app/services/auto_scaler.rb +185 -0
- data/lib/web47core/config.rb +3 -1
- data/lib/web47core/version.rb +1 -1
- data/lib/web47core.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c408e11bf933327bb1c63ef9931033cb2b831ad86b3bfbf73a9e8b5c53eb89dd
|
|
4
|
+
data.tar.gz: d3cd71bfc1661417a8afc7c0897c4330fe9e32bc5cb8a80dbfee8cca7309de90
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: edfc1faa44990b256df9722a90da6d97d3857a09dbdbbc985a9d0b3395c907414a4bd39c502f1ea71e229ae008530ea8a41c1cf6d03bed95ba485a2a4584e20c
|
|
7
|
+
data.tar.gz: '08816099746e7f020601ac51972d90a8a72b680c11bb14968c7acd3ef281defcb48646b172742c216ad40591b4ca7a045b6e66976a1424eda7216cff87f58eae'
|
|
@@ -13,7 +13,8 @@ class StatusController < ActionController::Base
|
|
|
13
13
|
redis: redis_status,
|
|
14
14
|
jobs: delayed_jobs_status,
|
|
15
15
|
cron_job_servers: cron_job_servers_status,
|
|
16
|
-
workers: workers_status
|
|
16
|
+
workers: workers_status,
|
|
17
|
+
version: version_status }
|
|
17
18
|
|
|
18
19
|
respond_to do |format|
|
|
19
20
|
format.html { render :index, locals: { components: ui_decorators(components) }, layout: false }
|
|
@@ -105,32 +106,27 @@ class StatusController < ActionController::Base
|
|
|
105
106
|
end
|
|
106
107
|
|
|
107
108
|
#
|
|
108
|
-
# Cron job primary status
|
|
109
|
+
# Cron job primary status. Up or down only. Host, pid, and check-in time stay on the admin page.
|
|
109
110
|
#
|
|
110
111
|
def cron_job_servers_status
|
|
111
112
|
server = cron_job_server
|
|
112
|
-
raise '
|
|
113
|
+
raise 'Down' if server.blank? || server.dead?
|
|
113
114
|
|
|
114
|
-
|
|
115
|
-
raise "Primary Server is DEAD: #{server_info}" if server.dead?
|
|
116
|
-
|
|
117
|
-
report_success "Primary Server is alive: #{server_info}",
|
|
118
|
-
primary_count: 1,
|
|
119
|
-
total_count: Cron::Server.count
|
|
115
|
+
report_success 'Up', primary_count: 1, total_count: Cron::Server.count
|
|
120
116
|
rescue StandardError => error
|
|
121
117
|
report_error(error, primary_count: 0, total_count: Cron::Server.count)
|
|
122
118
|
end
|
|
123
119
|
|
|
124
120
|
#
|
|
125
|
-
# Desired and current worker
|
|
121
|
+
# Desired and current worker counts, last written by AutoScaler.
|
|
126
122
|
#
|
|
127
123
|
def workers_status
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
report_success "Workers #{
|
|
132
|
-
desired_count:
|
|
133
|
-
current_count:
|
|
124
|
+
config = SystemConfiguration.configuration
|
|
125
|
+
desired = config.aws_desired_worker_count.to_i
|
|
126
|
+
current = config.aws_current_worker_count.to_i
|
|
127
|
+
report_success "Workers #{desired}/ #{current}",
|
|
128
|
+
desired_count: desired,
|
|
129
|
+
current_count: current
|
|
134
130
|
rescue StandardError => error
|
|
135
131
|
report_error(error, desired_count: 0, current_count: 0)
|
|
136
132
|
end
|
|
@@ -138,4 +134,22 @@ class StatusController < ActionController::Base
|
|
|
138
134
|
def cron_job_server
|
|
139
135
|
@cron_job_server ||= Cron::Server.primary_server
|
|
140
136
|
end
|
|
137
|
+
|
|
138
|
+
#
|
|
139
|
+
# Deployed image identity. GIT_SHA and BUILT_AT are injected at image build time.
|
|
140
|
+
# Missing values stay successful so an older task does not fail the health check.
|
|
141
|
+
#
|
|
142
|
+
def version_status
|
|
143
|
+
built_at = ENV['BUILT_AT'].presence
|
|
144
|
+
git_sha = ENV['GIT_SHA'].presence
|
|
145
|
+
report_success(version_message(built_at, git_sha), built_at: built_at, git_sha: git_sha)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def version_message(built_at, git_sha)
|
|
149
|
+
return 'Version not set' if built_at.blank? && git_sha.blank?
|
|
150
|
+
return built_at if git_sha.blank?
|
|
151
|
+
return git_sha if built_at.blank?
|
|
152
|
+
|
|
153
|
+
"#{built_at} #{git_sha}"
|
|
154
|
+
end
|
|
141
155
|
end
|
data/lib/app/jobs/cron/server.rb
CHANGED
|
@@ -16,8 +16,6 @@ module Cron
|
|
|
16
16
|
#
|
|
17
17
|
# Fields
|
|
18
18
|
#
|
|
19
|
-
field :desired_server_count, type: Integer, default: 0
|
|
20
|
-
field :current_server_count, type: Integer, default: 0
|
|
21
19
|
field :state, type: String, default: STATE_SECONDARY
|
|
22
20
|
#
|
|
23
21
|
# Validations
|
|
@@ -52,7 +50,7 @@ module Cron
|
|
|
52
50
|
|
|
53
51
|
def run_cron_jobs
|
|
54
52
|
run_jobs
|
|
55
|
-
|
|
53
|
+
AutoScaler.check
|
|
56
54
|
end
|
|
57
55
|
|
|
58
56
|
# @abstract Run all cron tab and emitter jobs
|
|
@@ -85,15 +83,6 @@ module Cron
|
|
|
85
83
|
Cron::Server.where(state: STATE_PRIMARY).first
|
|
86
84
|
end
|
|
87
85
|
|
|
88
|
-
#
|
|
89
|
-
# Warm up a server on the next evaluation
|
|
90
|
-
#
|
|
91
|
-
def self.warm_up_server
|
|
92
|
-
return unless auto_scaling_configured?
|
|
93
|
-
|
|
94
|
-
primary_server.auto_scale([primary_server.desired_server_count + 1, 10].min)
|
|
95
|
-
end
|
|
96
|
-
|
|
97
86
|
#
|
|
98
87
|
# Become primary, making others secondary
|
|
99
88
|
#
|
|
@@ -148,124 +137,6 @@ module Cron
|
|
|
148
137
|
!alive?
|
|
149
138
|
end
|
|
150
139
|
|
|
151
|
-
#
|
|
152
|
-
# Auto scale environment
|
|
153
|
-
#
|
|
154
|
-
def check_auto_scale
|
|
155
|
-
return unless auto_scaling_configured?
|
|
156
|
-
|
|
157
|
-
if delayed_jobs_count.zero?
|
|
158
|
-
handle_zero_job_count
|
|
159
|
-
else
|
|
160
|
-
handle_auto_scale_jobs
|
|
161
|
-
end
|
|
162
|
-
end
|
|
163
|
-
|
|
164
|
-
def sys_config
|
|
165
|
-
@sys_config ||= SystemConfiguration.configuration
|
|
166
|
-
end
|
|
167
|
-
|
|
168
|
-
#
|
|
169
|
-
# Test if autoscaling is configured, return false if there is an error
|
|
170
|
-
#
|
|
171
|
-
def auto_scaling_configured?
|
|
172
|
-
@auto_scaling_configured ||= sys_config.aws_auto_scaling_configured?
|
|
173
|
-
rescue StandardError
|
|
174
|
-
false
|
|
175
|
-
end
|
|
176
|
-
|
|
177
|
-
#
|
|
178
|
-
# Test if autoscaling is configured, return false if there is an error
|
|
179
|
-
#
|
|
180
|
-
def self.auto_scaling_configured?
|
|
181
|
-
SystemConfiguration.aws_auto_scaling_configured?
|
|
182
|
-
rescue StandardError
|
|
183
|
-
false
|
|
184
|
-
end
|
|
185
|
-
|
|
186
|
-
# @abstract Returns the AWS ECS service
|
|
187
|
-
# @return [Aws::ECS::Types::Service]
|
|
188
|
-
def ecs_service
|
|
189
|
-
filter = { cluster: sys_config.aws_ecs_cluster_worker_name, services: [sys_config.aws_ecs_service_worker_name] }
|
|
190
|
-
@ecs_service ||= ecs_client.describe_services(filter).services.first
|
|
191
|
-
end
|
|
192
|
-
|
|
193
|
-
# @abstract Returns a count of the Delayed Jobs in queue that have not failed
|
|
194
|
-
# @return [Integer]
|
|
195
|
-
def delayed_jobs_count
|
|
196
|
-
@delayed_jobs_count ||= Delayed::Backend::Mongoid::Job.where(failed_at: nil).read(mode: :primary).count
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
# @abstract Returns the current value of 'desired capacity' for the ECS Service
|
|
200
|
-
# @return [Integer]
|
|
201
|
-
def current_desired_capacity
|
|
202
|
-
current = ecs_service.desired_count
|
|
203
|
-
set current_server_count: current
|
|
204
|
-
current
|
|
205
|
-
rescue StandardError
|
|
206
|
-
puts 'error on desirect capacy'
|
|
207
|
-
0
|
|
208
|
-
end
|
|
209
|
-
|
|
210
|
-
#
|
|
211
|
-
# Calls the 'auto_scale' method with a 'desired_count' of 0 unless the capacity is already at 0
|
|
212
|
-
#
|
|
213
|
-
def handle_zero_job_count
|
|
214
|
-
return if current_desired_capacity.zero?
|
|
215
|
-
|
|
216
|
-
auto_scale
|
|
217
|
-
end
|
|
218
|
-
|
|
219
|
-
#
|
|
220
|
-
# Calls the 'auto_scale' method with a variable 'desired_count' based on how many jobs are running
|
|
221
|
-
# We don't need any more workers if the job count is less than 1,000
|
|
222
|
-
#
|
|
223
|
-
def handle_auto_scale_jobs
|
|
224
|
-
return if delayed_jobs_count < sys_config.aws_min_worker_job_count
|
|
225
|
-
|
|
226
|
-
case delayed_jobs_count
|
|
227
|
-
when 1..200
|
|
228
|
-
auto_scale(1)
|
|
229
|
-
when 201..500
|
|
230
|
-
auto_scale(2)
|
|
231
|
-
when 501..800
|
|
232
|
-
auto_scale(3)
|
|
233
|
-
when 801..1_200
|
|
234
|
-
auto_scale(4)
|
|
235
|
-
when 1_201..2_000
|
|
236
|
-
auto_scale(4)
|
|
237
|
-
when 2_001..3_000
|
|
238
|
-
auto_scale(5)
|
|
239
|
-
when 3_001..4_000
|
|
240
|
-
auto_scale(5)
|
|
241
|
-
when 4_001..6_000
|
|
242
|
-
auto_scale(6)
|
|
243
|
-
when 6_001..8_000
|
|
244
|
-
auto_scale(7)
|
|
245
|
-
when 8_001..10_000
|
|
246
|
-
auto_scale(8)
|
|
247
|
-
when 10_001..13_000
|
|
248
|
-
auto_scale(9)
|
|
249
|
-
else
|
|
250
|
-
auto_scale(10)
|
|
251
|
-
end
|
|
252
|
-
end
|
|
253
|
-
|
|
254
|
-
#
|
|
255
|
-
# Sets the desired and minimum number of EC2 instances to run
|
|
256
|
-
#
|
|
257
|
-
def auto_scale(desired_count = 0)
|
|
258
|
-
set desired_server_count: desired_count
|
|
259
|
-
# Make sure we don't remove any workers with assigned jobs by accident
|
|
260
|
-
return if desired_count.positive? && desired_count <= current_desired_capacity
|
|
261
|
-
|
|
262
|
-
ecs_client.update_service(cluster: sys_config.aws_ecs_cluster_worker_name,
|
|
263
|
-
service: sys_config.aws_ecs_service_worker_name,
|
|
264
|
-
desired_count: desired_count)
|
|
265
|
-
rescue StandardError => error
|
|
266
|
-
App47Logger.log_error "Unable to set ECS service auto scaler to #{desired_count}", error
|
|
267
|
-
end
|
|
268
|
-
|
|
269
140
|
#
|
|
270
141
|
# Look to make sure there is only one primary
|
|
271
142
|
#
|
|
@@ -276,28 +147,8 @@ module Cron
|
|
|
276
147
|
errors.add(:state, 'there can only be one primary') unless primary.blank? || primary.eql?(self)
|
|
277
148
|
end
|
|
278
149
|
|
|
279
|
-
#
|
|
280
|
-
# Returns the count of active servers
|
|
281
|
-
#
|
|
282
|
-
def active_count
|
|
283
|
-
current_server_count
|
|
284
|
-
end
|
|
285
|
-
|
|
286
|
-
#
|
|
287
|
-
# Returns the count of inactive servers
|
|
288
|
-
#
|
|
289
|
-
def inactive_count
|
|
290
|
-
desired_server_count
|
|
291
|
-
end
|
|
292
|
-
|
|
293
150
|
def ensure_last_check_in
|
|
294
151
|
self.last_check_in_at ||= Time.now.utc
|
|
295
152
|
end
|
|
296
|
-
|
|
297
|
-
# @abstract Returns the AWS ECS client
|
|
298
|
-
# @return [Aws::ECS::Client]
|
|
299
|
-
def ecs_client
|
|
300
|
-
@ecs_client ||= sys_config.aws_ecs_client
|
|
301
|
-
end
|
|
302
153
|
end
|
|
303
154
|
end
|
|
@@ -13,9 +13,13 @@ module AwsConfiguration
|
|
|
13
13
|
#
|
|
14
14
|
field :aws_region, type: String
|
|
15
15
|
field :aws_bucket_name, type: String
|
|
16
|
-
|
|
16
|
+
# Worker fleet size asked for by AutoScaler. Not edited from the admin form.
|
|
17
|
+
field :aws_desired_worker_count, type: Integer, default: 0
|
|
18
|
+
# ECS service desired count from the last DescribeServices. Not the running task count.
|
|
19
|
+
field :aws_current_worker_count, type: Integer, default: 0
|
|
17
20
|
|
|
18
|
-
validates :
|
|
21
|
+
validates :aws_desired_worker_count, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
|
|
22
|
+
validates :aws_current_worker_count, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
|
|
19
23
|
end
|
|
20
24
|
end
|
|
21
25
|
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'singleton'
|
|
4
|
+
|
|
5
|
+
#
|
|
6
|
+
# Resize the ECS worker service from the current thread.
|
|
7
|
+
#
|
|
8
|
+
# check runs after the primary cron server has launched due jobs.
|
|
9
|
+
# warm_up raises the fleet to a floor. bump_worker adds one worker.
|
|
10
|
+
# Neither call lowers a fleet that is already larger, except check when the
|
|
11
|
+
# ladder maps the queue to zero workers.
|
|
12
|
+
#
|
|
13
|
+
# A host project replaces the ladder at boot:
|
|
14
|
+
#
|
|
15
|
+
# Web47core::Config.worker_ladder = [
|
|
16
|
+
# [0..49, 0],
|
|
17
|
+
# [50..500, 2],
|
|
18
|
+
# [501.., 6]
|
|
19
|
+
# ]
|
|
20
|
+
#
|
|
21
|
+
# Queue depth and the live ECS desired count are read on every call.
|
|
22
|
+
# The singleton only keeps the ECS client.
|
|
23
|
+
#
|
|
24
|
+
class AutoScaler
|
|
25
|
+
include Singleton
|
|
26
|
+
|
|
27
|
+
unless defined? DEFAULT_WORKER_LADDER
|
|
28
|
+
DEFAULT_WORKER_LADDER = [
|
|
29
|
+
[0..0, 0],
|
|
30
|
+
[1..200, 1],
|
|
31
|
+
[201..500, 2],
|
|
32
|
+
[501..800, 3],
|
|
33
|
+
[801..2_000, 4],
|
|
34
|
+
[2_001..4_000, 5],
|
|
35
|
+
[4_001..6_000, 6],
|
|
36
|
+
[6_001..8_000, 7],
|
|
37
|
+
[8_001..10_000, 8],
|
|
38
|
+
[10_001..13_000, 9],
|
|
39
|
+
[13_001.., 10]
|
|
40
|
+
].freeze
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def self.check
|
|
44
|
+
instance.check
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def self.warm_up(min: 1)
|
|
48
|
+
instance.warm_up(min: min)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def self.bump_worker
|
|
52
|
+
instance.bump_worker
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def self.reset
|
|
56
|
+
instance.reset
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def check
|
|
60
|
+
return unless configured?
|
|
61
|
+
|
|
62
|
+
apply_target(desired_for(delayed_jobs_count))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
#
|
|
66
|
+
# Raise the ECS desired count to at least min. Never lowers the fleet.
|
|
67
|
+
#
|
|
68
|
+
def warm_up(min: 1)
|
|
69
|
+
return unless configured?
|
|
70
|
+
|
|
71
|
+
target = [[min.to_i, 1].max, max_worker_count].min
|
|
72
|
+
scale_to(target)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
#
|
|
76
|
+
# Add one worker to the live ECS desired count, capped at the ladder maximum.
|
|
77
|
+
#
|
|
78
|
+
def bump_worker
|
|
79
|
+
return unless configured?
|
|
80
|
+
|
|
81
|
+
current = live_desired_count
|
|
82
|
+
return if current.nil?
|
|
83
|
+
|
|
84
|
+
scale_to([current + 1, max_worker_count].min, current: current)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
def reset
|
|
88
|
+
@ecs_client = nil
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
private
|
|
92
|
+
|
|
93
|
+
def apply_target(target)
|
|
94
|
+
record_desired(target)
|
|
95
|
+
current = live_desired_count
|
|
96
|
+
return if current.nil?
|
|
97
|
+
return if target.positive? && target <= current
|
|
98
|
+
return if target.zero? && current.zero?
|
|
99
|
+
|
|
100
|
+
update_service(target)
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def scale_to(target, current: nil)
|
|
104
|
+
current = live_desired_count if current.nil?
|
|
105
|
+
return if current.nil? || target <= current
|
|
106
|
+
|
|
107
|
+
record_desired(target)
|
|
108
|
+
update_service(target)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def desired_for(job_count)
|
|
112
|
+
worker_ladder.each do |range, workers|
|
|
113
|
+
return workers if range.cover?(job_count)
|
|
114
|
+
end
|
|
115
|
+
worker_ladder.last.last
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
def max_worker_count
|
|
119
|
+
worker_ladder.map(&:last).max
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def worker_ladder
|
|
123
|
+
Web47core::Config.worker_ladder.presence || DEFAULT_WORKER_LADDER
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
#
|
|
127
|
+
# ECS service desired count. nil when the service cannot be read, so a
|
|
128
|
+
# failed describe does not look like a fleet of zero.
|
|
129
|
+
#
|
|
130
|
+
def live_desired_count
|
|
131
|
+
service = describe_service
|
|
132
|
+
return nil unless service
|
|
133
|
+
|
|
134
|
+
count = service.desired_count
|
|
135
|
+
configuration.set(aws_current_worker_count: count)
|
|
136
|
+
count
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
def describe_service
|
|
140
|
+
client = ecs_client
|
|
141
|
+
return nil unless client
|
|
142
|
+
|
|
143
|
+
filter = {
|
|
144
|
+
cluster: configuration.aws_ecs_cluster_worker_name,
|
|
145
|
+
services: [configuration.aws_ecs_service_worker_name]
|
|
146
|
+
}
|
|
147
|
+
client.describe_services(filter).services.first
|
|
148
|
+
rescue StandardError => error
|
|
149
|
+
App47Logger.log_error 'Unable to read ECS worker service', error
|
|
150
|
+
nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def record_desired(count)
|
|
154
|
+
configuration.set(aws_desired_worker_count: count)
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def update_service(desired_count)
|
|
158
|
+
ecs_client.update_service(cluster: configuration.aws_ecs_cluster_worker_name,
|
|
159
|
+
service: configuration.aws_ecs_service_worker_name,
|
|
160
|
+
desired_count: desired_count)
|
|
161
|
+
rescue StandardError => error
|
|
162
|
+
App47Logger.log_error "Unable to set ECS service auto scaler to #{desired_count}", error
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
def delayed_jobs_count
|
|
166
|
+
Delayed::Backend::Mongoid::Job.where(failed_at: nil).read(mode: :primary).count
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def configured?
|
|
170
|
+
configuration.aws_auto_scaling_configured?
|
|
171
|
+
rescue StandardError
|
|
172
|
+
false
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
def configuration
|
|
176
|
+
SystemConfiguration.configuration
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def ecs_client
|
|
180
|
+
@ecs_client ||= configuration.aws_ecs_client
|
|
181
|
+
rescue StandardError => error
|
|
182
|
+
App47Logger.log_error 'Unable to build ECS client', error
|
|
183
|
+
nil
|
|
184
|
+
end
|
|
185
|
+
end
|
data/lib/web47core/config.rb
CHANGED
|
@@ -6,18 +6,20 @@ module Web47core
|
|
|
6
6
|
#
|
|
7
7
|
class Config
|
|
8
8
|
include Singleton
|
|
9
|
-
attr_accessor :email_able_models, :switchboard_able_models, :audit_model
|
|
9
|
+
attr_accessor :email_able_models, :switchboard_able_models, :audit_model, :worker_ladder
|
|
10
10
|
|
|
11
11
|
def initialize
|
|
12
12
|
@email_able_models = []
|
|
13
13
|
@switchboard_able_models = []
|
|
14
14
|
@audit_model = :user
|
|
15
|
+
@worker_ladder = nil
|
|
15
16
|
end
|
|
16
17
|
|
|
17
18
|
def self.reset
|
|
18
19
|
instance.email_able_models = []
|
|
19
20
|
instance.switchboard_able_models = []
|
|
20
21
|
instance.audit_model = :user
|
|
22
|
+
instance.worker_ladder = nil
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
def self.audit_model_log_class
|
data/lib/web47core/version.rb
CHANGED
data/lib/web47core.rb
CHANGED
|
@@ -61,6 +61,7 @@ require 'app/jobs/cron/record_delayed_job_metrics'
|
|
|
61
61
|
require 'app/jobs/cron/restart_orphaned_delayed_jobs'
|
|
62
62
|
require 'app/jobs/cron/trim_delayed_job_metrics'
|
|
63
63
|
require 'app/jobs/cron/trim_delayed_job_workers'
|
|
64
|
+
require 'app/services/auto_scaler'
|
|
64
65
|
require 'app/jobs/cron/server'
|
|
65
66
|
require 'app/jobs/cron/switchboard_sync_configuration'
|
|
66
67
|
require 'app/jobs/cron/switchboard_sync_models'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: web47core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.2.3.
|
|
4
|
+
version: 3.2.3.42
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Schroeder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|
|
@@ -6606,6 +6606,7 @@ files:
|
|
|
6606
6606
|
- lib/app/models/user_action_audit_log.rb
|
|
6607
6607
|
- lib/app/models/user_audit_log.rb
|
|
6608
6608
|
- lib/app/models/user_model_audit_log.rb
|
|
6609
|
+
- lib/app/services/auto_scaler.rb
|
|
6609
6610
|
- lib/app/validators/email_format_validator.rb
|
|
6610
6611
|
- lib/app/validators/http_url_validator.rb
|
|
6611
6612
|
- lib/merge_coverage.rb
|