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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adecf31e5c9eb6a72d45ea6b58ea0fa4a3788e32e9fe823d967f1881d4d54016
4
- data.tar.gz: 68815c4b88e800c59b72f9fadb359b73ac4eea34db23ea03b7b8f6825f158f0f
3
+ metadata.gz: 6dd5a13a85dcb1c2a8e22e675c54f635b4599715d0fb0c987bd94ec81be6e9e1
4
+ data.tar.gz: 429d55cd2b0a788839606a348cbd64e71089c56d8c7749daea13030d0481be88
5
5
  SHA512:
6
- metadata.gz: 9d9ccdbf34b264d353bdcdf95a9edc8f3780dcfd344c138ceb82692a046cd6a9311774e2c94dc1478fdbbfff3db6ea088f9cca41f46a3a638bbe3bf8a0dee1cb
7
- data.tar.gz: 9b58cc75e7d3306350d3dc5a5a8a9ff7beb8216ee094ce0d707494f0e6c064eae886cf517bbb9bd66a76d4b2c758684c0a5c6a894d9099f5541af7100cdf887b
6
+ metadata.gz: 712b103f0708dfb037945aff505a692d158b9847be9a4d1ddea745380ae8eb0105ad15d2787a74dff1f85cb93e6c9bb6d1bfba3dbf62b175f7ee66db709548b8
7
+ data.tar.gz: 71d629e47d1a354fd775951cb001da61be779b7698307f2178a9644310989dad762984906ef6703745ce71b948c1c3a2e40e1403d8623c283a4e0921e19b52ea
@@ -1,5 +1,10 @@
1
1
  module Scheddy
2
- class ApplicationRecord < ActiveRecord::Base
3
- self.abstract_class = true
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
@@ -1,3 +1,3 @@
1
1
  module Scheddy
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.2"
3
3
  end
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.0
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-06-09 00:00:00.000000000 Z
11
+ date: 2023-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fugit