crono_trigger 0.3.0 → 0.3.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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8d12624dcc2f27a3f0bc7c83544ae735490c8d4294587fe6fce6b16661d934c1
|
4
|
+
data.tar.gz: 931bd6e1dcba7a0a77f644235d74f762f3587e65b17a36a1bb9bf962b8e27a9e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aee050331778f7db89628d332efc7c4cfe7965dc2a8b19f6bd1eaa678045f5fe5b64042ba3b7511bee542f9b310debdd65728694e2c4f07b94bd1c362a80370a
|
7
|
+
data.tar.gz: ef25f44ecdc3afc9dab964ffa9d82ff455d02fe26d96614951df75b764a9067cbc177083bbbb4f39071e6d3208a99cd924613b04b26866d09506eb56f8360d9e
|
data/.travis.yml
CHANGED
@@ -2,9 +2,14 @@ sudo: false
|
|
2
2
|
language: ruby
|
3
3
|
cache: bundler
|
4
4
|
rvm:
|
5
|
-
- 2.
|
6
|
-
- 2.
|
5
|
+
- 2.5.0
|
6
|
+
- 2.4.3
|
7
7
|
gemfile:
|
8
|
-
- gemfiles/activerecord-42.gemfile
|
9
8
|
- gemfiles/activerecord-50.gemfile
|
10
9
|
- gemfiles/activerecord-51.gemfile
|
10
|
+
- gemfiles/activerecord-52.gemfile
|
11
|
+
before_install:
|
12
|
+
- mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
|
13
|
+
env:
|
14
|
+
- DB=sqlite
|
15
|
+
- DB=mysql MYSQL_RESTART_COMMAND="sudo service mysql restart"
|
data/crono_trigger.gemspec
CHANGED
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_dependency "activerecord", ">= 4.2"
|
30
30
|
|
31
31
|
spec.add_development_dependency "sqlite3"
|
32
|
+
spec.add_development_dependency "mysql2"
|
32
33
|
spec.add_development_dependency "timecop"
|
33
34
|
spec.add_development_dependency "rollbar"
|
34
35
|
spec.add_development_dependency "bundler", "~> 1.14"
|
@@ -34,12 +34,9 @@ module CronoTrigger
|
|
34
34
|
records = []
|
35
35
|
primary_key_offset = nil
|
36
36
|
begin
|
37
|
-
|
38
|
-
conn = model.connection_pool.checkout
|
37
|
+
model.connection_pool.with_connection do
|
39
38
|
records = model.executables_with_lock(primary_key_offset: primary_key_offset)
|
40
39
|
primary_key_offset = records.last && records.last.id
|
41
|
-
ensure
|
42
|
-
model.connection_pool.checkin(conn)
|
43
40
|
end
|
44
41
|
|
45
42
|
records.each do |record|
|
@@ -33,7 +33,7 @@ module CronoTrigger
|
|
33
33
|
rel = rel.where(t[crono_trigger_column_name(:finished_at)].gt(from).or(t[crono_trigger_column_name(:finished_at)].eq(nil))) if column_names.include?(crono_trigger_column_name(:finished_at))
|
34
34
|
rel = rel.where(t[primary_key].gt(primary_key_offset)) if primary_key_offset
|
35
35
|
|
36
|
-
rel = rel.order("#{quoted_table_name}.#{quoted_primary_key} ASC").limit(limit)
|
36
|
+
rel = rel.order(Arel.sql("#{quoted_table_name}.#{quoted_primary_key} ASC")).limit(limit)
|
37
37
|
|
38
38
|
rel = executable_conditions.reduce(rel) do |merged, pr|
|
39
39
|
if pr.arity == 0
|
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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chrono
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: mysql2
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: timecop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,9 +212,9 @@ files:
|
|
198
212
|
- bin/setup
|
199
213
|
- crono_trigger.gemspec
|
200
214
|
- exe/crono_trigger
|
201
|
-
- gemfiles/activerecord-42.gemfile
|
202
215
|
- gemfiles/activerecord-50.gemfile
|
203
216
|
- gemfiles/activerecord-51.gemfile
|
217
|
+
- gemfiles/activerecord-52.gemfile
|
204
218
|
- lib/crono_trigger.rb
|
205
219
|
- lib/crono_trigger/cli.rb
|
206
220
|
- lib/crono_trigger/exception_handler.rb
|
@@ -236,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
250
|
version: '0'
|
237
251
|
requirements: []
|
238
252
|
rubyforge_project:
|
239
|
-
rubygems_version: 2.
|
253
|
+
rubygems_version: 2.7.4
|
240
254
|
signing_key:
|
241
255
|
specification_version: 4
|
242
256
|
summary: In Service Asynchronous Job Scheduler for Rails
|