perfectsched 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +7 -0
- data/lib/perfectsched/backend/null.rb +45 -0
- data/lib/perfectsched/backend/rdb.rb +2 -2
- data/lib/perfectsched/backend/simpledb.rb +1 -1
- data/lib/perfectsched/version.rb +1 -1
- metadata +11 -10
data/ChangeLog
CHANGED
@@ -1,4 +1,11 @@
|
|
1
1
|
|
2
|
+
== 2011-12-04 version 0.7.4
|
3
|
+
|
4
|
+
* Added NullBackend
|
5
|
+
* RDBBackend considers URLs begin with jdbc::mysql
|
6
|
+
* Reduced MAX_SELECT_ROW from 32 to 4 to reduce backend load
|
7
|
+
|
8
|
+
|
2
9
|
== 2011-11-29 version 0.7.3
|
3
10
|
|
4
11
|
* gemspec: replaced '=' dependency into '>=' + '<=' to avoid rubygems+jruby bug
|
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
module PerfectSched
|
3
|
+
|
4
|
+
|
5
|
+
class NullBackend < Backend
|
6
|
+
def list(&block)
|
7
|
+
nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def acquire(timeout, now=Time.now.to_i)
|
11
|
+
nil
|
12
|
+
end
|
13
|
+
|
14
|
+
def finish(token, next_time, timeout)
|
15
|
+
false
|
16
|
+
end
|
17
|
+
|
18
|
+
def add_checked(id, cron, delay, data, next_time, timeout)
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
|
22
|
+
def delete(id)
|
23
|
+
false
|
24
|
+
end
|
25
|
+
|
26
|
+
def get(id)
|
27
|
+
nil
|
28
|
+
end
|
29
|
+
|
30
|
+
def modify_checked(id, cron, delay, data)
|
31
|
+
false
|
32
|
+
end
|
33
|
+
|
34
|
+
def modify_sched_checked(id, cron, delay)
|
35
|
+
false
|
36
|
+
end
|
37
|
+
|
38
|
+
def modify_data_checked(id, data)
|
39
|
+
false
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
end
|
45
|
+
|
@@ -9,7 +9,7 @@ class RDBBackend < Backend
|
|
9
9
|
@uri = uri
|
10
10
|
@table = table
|
11
11
|
@db = Sequel.connect(@uri)
|
12
|
-
init_db(@uri.split('
|
12
|
+
init_db(@uri.split('//',2)[0])
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
@@ -58,7 +58,7 @@ class RDBBackend < Backend
|
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
61
|
-
MAX_SELECT_ROW =
|
61
|
+
MAX_SELECT_ROW = 4
|
62
62
|
|
63
63
|
def acquire(timeout, now=Time.now.to_i)
|
64
64
|
connect {
|
data/lib/perfectsched/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: perfectsched
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-04 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cron-spec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70181540031500 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - <=
|
@@ -24,10 +24,10 @@ dependencies:
|
|
24
24
|
version: 0.1.2
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
|
-
version_requirements: *
|
27
|
+
version_requirements: *70181540031500
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: sequel
|
30
|
-
requirement: &
|
30
|
+
requirement: &70181540030640 !ruby/object:Gem::Requirement
|
31
31
|
none: false
|
32
32
|
requirements:
|
33
33
|
- - ~>
|
@@ -35,10 +35,10 @@ dependencies:
|
|
35
35
|
version: 3.26.0
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
|
-
version_requirements: *
|
38
|
+
version_requirements: *70181540030640
|
39
39
|
- !ruby/object:Gem::Dependency
|
40
40
|
name: aws-sdk
|
41
|
-
requirement: &
|
41
|
+
requirement: &70181540030080 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
@@ -46,10 +46,10 @@ dependencies:
|
|
46
46
|
version: 1.1.1
|
47
47
|
type: :runtime
|
48
48
|
prerelease: false
|
49
|
-
version_requirements: *
|
49
|
+
version_requirements: *70181540030080
|
50
50
|
- !ruby/object:Gem::Dependency
|
51
51
|
name: perfectqueue
|
52
|
-
requirement: &
|
52
|
+
requirement: &70181540029520 !ruby/object:Gem::Requirement
|
53
53
|
none: false
|
54
54
|
requirements:
|
55
55
|
- - ~>
|
@@ -57,7 +57,7 @@ dependencies:
|
|
57
57
|
version: 0.7.0
|
58
58
|
type: :runtime
|
59
59
|
prerelease: false
|
60
|
-
version_requirements: *
|
60
|
+
version_requirements: *70181540029520
|
61
61
|
description:
|
62
62
|
email: frsyuki@gmail.com
|
63
63
|
executables:
|
@@ -70,6 +70,7 @@ files:
|
|
70
70
|
- bin/perfectsched
|
71
71
|
- lib/perfectsched.rb
|
72
72
|
- lib/perfectsched/backend.rb
|
73
|
+
- lib/perfectsched/backend/null.rb
|
73
74
|
- lib/perfectsched/backend/rdb.rb
|
74
75
|
- lib/perfectsched/backend/simpledb.rb
|
75
76
|
- lib/perfectsched/command/perfectsched.rb
|