bizside 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bizside/resque.rb +36 -0
- data/lib/bizside/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c335798feba6e981e50b8d9aaa79eca2417627f5de40af3ddbd7d8bdf28fbec
|
4
|
+
data.tar.gz: c6317c6ab85daf3ac135564dca835eeec7e41e5c8461fadd48c2ed6ca7f58bfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce65569c73a77debb6e7a113fe2e57d634f77b923774463cc8a1ce55fe7744b371f6b6393b00bbad562257373bd6d04e33e85fe0d4550a435c9a428f06e739cf
|
7
|
+
data.tar.gz: 38dc38e60d2f93a5da57f6900df7ecb9f8e21027d37de869f59830b8be9da51d0972a3698d6e3543c74c3709aeb635216f149de3b9e6ee330ade3a76a07e316a
|
data/lib/bizside/resque.rb
CHANGED
@@ -159,3 +159,39 @@ end
|
|
159
159
|
Resque::Failure::Multiple.configure do |multi|
|
160
160
|
multi.classes = [Resque::Failure::Redis, Resque::Failure::LogOutput, Resque::Failure::JobAuditLog]
|
161
161
|
end
|
162
|
+
|
163
|
+
# resque-scheduler
|
164
|
+
if defined? Resque::Scheduler
|
165
|
+
module Bizside
|
166
|
+
module ResqueScheduler
|
167
|
+
class FailureHandler
|
168
|
+
def self.on_enqueue_failure(payload, exception)
|
169
|
+
::Resque::Scheduler::FailureHandler.on_enqueue_failure(payload, exception)
|
170
|
+
|
171
|
+
return if Bizside.rails_env&.test?
|
172
|
+
|
173
|
+
::Bizside.logger.error [
|
174
|
+
"[FATAL] Resque::Scheduler",
|
175
|
+
"#{payload}",
|
176
|
+
"#{exception.class} #{exception.to_s}",
|
177
|
+
"#{Array(exception.backtrace).join("\n")}"
|
178
|
+
].join("\n")
|
179
|
+
|
180
|
+
@hostname ||= (`hostname`.chomp rescue '(unknown)')
|
181
|
+
info = {
|
182
|
+
time: Time.now.strftime('%Y-%m-%dT%H:%M:%S.%3N%z'),
|
183
|
+
add_on_name: Bizside.config.add_on_name,
|
184
|
+
server_address: @hostname,
|
185
|
+
class: payload['class'],
|
186
|
+
args: payload['args'].to_s,
|
187
|
+
exception: exception.class,
|
188
|
+
exception_message: exception.to_s,
|
189
|
+
exception_backtrace: Array(exception.backtrace)[0..10].join("\n") # Get only the top 10 because there are many traces.
|
190
|
+
}
|
191
|
+
::Bizside::Audit::JobLogger.logger.record(info)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
Resque::Scheduler.failure_handler = Bizside::ResqueScheduler::FailureHandler
|
197
|
+
end
|
data/lib/bizside/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bizside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bizside-developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -475,7 +475,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
475
475
|
- !ruby/object:Gem::Version
|
476
476
|
version: '0'
|
477
477
|
requirements: []
|
478
|
-
rubygems_version: 3.
|
478
|
+
rubygems_version: 3.4.18
|
479
479
|
signing_key:
|
480
480
|
specification_version: 4
|
481
481
|
summary: Bizside is an utilities for web application.
|