crono_trigger 0.8.2 → 0.8.3

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: 94ee913ba2838c73020154bb6f85f49ff93a4d2d3ba39bed1d0be26255b7d06c
4
- data.tar.gz: 4222b9af986177a6190c954b8dc9c639a06f5775568422929e3e33699443e5c5
3
+ metadata.gz: 05d21540f13b0418eb7a474a2efe964595c09c4a8ae433843cc33f8ea2861dc8
4
+ data.tar.gz: 989e4b3eb6e55077de647bd4d8626d4a556537f8d4c92f974d8b7475f36d9e43
5
5
  SHA512:
6
- metadata.gz: 2f0afb27ab496e72e5754c7adb777526aefee00b7c9e76e31775395c1d40dadf5889dc072308193becc43fa2b2e2e87a92f5ef5a93942319869065aa590aeb4b
7
- data.tar.gz: 21a0f3570da6a32302bd84ed72630afdcdf7c70f0b6e691fcb0bd21d6e3cdde87cf91129a74a09a2fd692f0a33830d7e904df6fc253ba9a63eb4709c225f2e3c
6
+ metadata.gz: 3176b9ccaa96a5676f6c28fb95968c4838a794a06ebe26b2a6ba4777b03487b0ce97d8b43f8a010bb9fb57336f5a2ada76cea9e21fbd642aad3d875fc1bed836
7
+ data.tar.gz: 33f6cb3606ced81f3a2e09b46d34ba21c7832de5adb57e1d8f6b0f39961363d6477a6d9e35da3cf4a85ac90048f9f65e221a887b5dcc5a3d2461e19881a9eb02
@@ -1,6 +1,8 @@
1
1
  name: RSpec
2
2
 
3
3
  on:
4
+ schedule:
5
+ - cron: "0 9 * * 1"
4
6
  push:
5
7
  branches: [ master ]
6
8
  pull_request:
@@ -7,13 +7,23 @@ module CronoTrigger
7
7
 
8
8
  scope :recently, ->(schedule_type:) { where(schedule_type: schedule_type).order(executed_at: :desc) }
9
9
 
10
- enum status: {
11
- executing: "executing",
12
- completed: "completed",
13
- failed: "failed",
14
- retrying: "retrying",
15
- aborted: "aborted",
16
- }
10
+ if ActiveRecord.version >= Gem::Version.new("7.0")
11
+ enum :status, {
12
+ executing: "executing",
13
+ completed: "completed",
14
+ failed: "failed",
15
+ retrying: "retrying",
16
+ aborted: "aborted",
17
+ }
18
+ else
19
+ enum status: {
20
+ executing: "executing",
21
+ completed: "completed",
22
+ failed: "failed",
23
+ retrying: "retrying",
24
+ aborted: "aborted",
25
+ }
26
+ end
17
27
 
18
28
  def self.create_with_timestamp!
19
29
  create!(executed_at: Time.current, status: :executing, worker_id: CronoTrigger.config.worker_id)
@@ -5,7 +5,11 @@ module CronoTrigger
5
5
 
6
6
  IGNORE_THRESHOLD = 300
7
7
 
8
- enum signal: {TERM: "TERM", USR1: "USR1", CONT: "CONT", TSTP: "TSTP"}
8
+ if ActiveRecord.version >= Gem::Version.new("7.0")
9
+ enum :signal, {TERM: "TERM", USR1: "USR1", CONT: "CONT", TSTP: "TSTP"}
10
+ else
11
+ enum signal: {TERM: "TERM", USR1: "USR1", CONT: "CONT", TSTP: "TSTP"}
12
+ end
9
13
 
10
14
  scope :sent_to_me, proc {
11
15
  raise "Must set worker_id" unless CronoTrigger.config.worker_id
@@ -7,7 +7,11 @@ module CronoTrigger
7
7
 
8
8
  ALIVE_THRESHOLD = CronoTrigger::Worker::HEARTBEAT_INTERVAL * 5
9
9
 
10
- enum executor_status: {running: "running", quiet: "quiet", shuttingdown: "shuttingdown", shutdown: "shutdown"}
10
+ if ActiveRecord.version >= Gem::Version.new("7.0")
11
+ enum :executor_status, {running: "running", quiet: "quiet", shuttingdown: "shuttingdown", shutdown: "shutdown"}
12
+ else
13
+ enum executor_status: {running: "running", quiet: "quiet", shuttingdown: "shuttingdown", shutdown: "shutdown"}
14
+ end
11
15
 
12
16
  if ActiveRecord.version >= Gem::Version.new("7.1.0")
13
17
  serialize :polling_model_names, coder: JSON
@@ -1,3 +1,3 @@
1
1
  module CronoTrigger
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crono_trigger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - joker1007
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-05-22 00:00:00.000000000 Z
11
+ date: 2024-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chrono
@@ -368,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
368
  - !ruby/object:Gem::Version
369
369
  version: '0'
370
370
  requirements: []
371
- rubygems_version: 3.5.9
371
+ rubygems_version: 3.5.11
372
372
  signing_key:
373
373
  specification_version: 4
374
374
  summary: In Service Asynchronous Job Scheduler for Rails