scheddy 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/scheddy/application_record.rb +7 -2
- data/lib/scheddy/task.rb +6 -0
- data/lib/scheddy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dd5a13a85dcb1c2a8e22e675c54f635b4599715d0fb0c987bd94ec81be6e9e1
|
4
|
+
data.tar.gz: 429d55cd2b0a788839606a348cbd64e71089c56d8c7749daea13030d0481be88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 712b103f0708dfb037945aff505a692d158b9847be9a4d1ddea745380ae8eb0105ad15d2787a74dff1f85cb93e6c9bb6d1bfba3dbf62b175f7ee66db709548b8
|
7
|
+
data.tar.gz: 71d629e47d1a354fd775951cb001da61be779b7698307f2178a9644310989dad762984906ef6703745ce71b948c1c3a2e40e1403d8623c283a4e0921e19b52ea
|
@@ -1,5 +1,10 @@
|
|
1
1
|
module Scheddy
|
2
|
-
|
3
|
-
|
2
|
+
if defined?(ActiveRecord::Base)
|
3
|
+
class ApplicationRecord < ActiveRecord::Base
|
4
|
+
self.abstract_class = true
|
5
|
+
end
|
6
|
+
else
|
7
|
+
class ApplicationRecord
|
8
|
+
end
|
4
9
|
end
|
5
10
|
end
|
data/lib/scheddy/task.rb
CHANGED
@@ -169,6 +169,12 @@ module Scheddy
|
|
169
169
|
|
170
170
|
def record_this_run
|
171
171
|
return unless track_runs
|
172
|
+
begin
|
173
|
+
Scheddy::TaskHistory.connection.verify!
|
174
|
+
rescue => e
|
175
|
+
logger.error "Database offline while updating task history for Scheddy task '#{name}': #{e.inspect}"
|
176
|
+
return
|
177
|
+
end
|
172
178
|
Scheddy::TaskHistory.logger.silence(Logger::INFO) do
|
173
179
|
task_history.update last_run_at: Time.current
|
174
180
|
end
|
data/lib/scheddy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scheddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thomas morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fugit
|