day_planner 0.1.0.pre32 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/models/day_planner/task.rb +1 -1
- data/lib/day_planner/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e271590157c68f68b21acaa7d4ba3847b60d6e0
|
4
|
+
data.tar.gz: 7e94325e55aca06a0d99055faf83304c326cb8eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69b1689fc1993c8e6dddd98fc38da980cb790f0b55de4f7216744dd3788dd4180f00c64d9fa04eae00ca0410ab4250e1ae7d6d142d9fc099585ae136d0d9a43f
|
7
|
+
data.tar.gz: e4b7effe0a70f8eec035ca0a773653275ee3854c6c11a8aafcad3f02df88190d56e29a55735d05d35a62a56325b0a859f288d62ca97726418a0d3d9660f0da7e
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ This file will be read in and its tasks will be added to the schedule automatica
|
|
30
30
|
|
31
31
|
The tasks in the schedule will each be performed on startup and then thereafter according to their stated intervals.
|
32
32
|
|
33
|
-
I'm not doing a whole damn ton to protect you from tasks that throw errors, but there is a begin/rescue/end up in there at some point. I definitely am not protecting you from a process that just won't end or anything like that. Remember that your interval is more or less the minimum possible time between instances of the task being performed, as it does not spawn a new thread for each task. (That seemed to cause problems with Heroku.) Setting a shorter interval will help, as it will endeavor to catch up to the schedule if it
|
33
|
+
I'm not doing a whole damn ton to protect you from tasks that throw errors, but there is a begin/rescue/end up in there at some point. I definitely am not protecting you from a process that just won't end or anything like that. Remember that your interval is more or less the minimum possible time between instances of the task being performed, as it does not spawn a new thread for each task. (That seemed to cause problems with Heroku.) Setting a shorter interval will help, as it will endeavor to catch up to the schedule, by running a task as soon as after half its specified interval if it's fallen behind, but will never execute tasks between the master scheduler thread's check intervals. Setting the check interval too short could end up blocking your application's main thread, though, particularly if your tasks end up running long.
|
34
34
|
|
35
35
|
### Options
|
36
36
|
|
@@ -80,7 +80,7 @@ If you'd like to log your tasks, go for it. Add logging thusly:
|
|
80
80
|
rails generate day_planner:log
|
81
81
|
rake db:migrate
|
82
82
|
|
83
|
-
This just adds an extra table entitled 'day_planner_log'. As long as the table's there, it'll log each task execution, as well as every instance in which DayPlanner activates.
|
83
|
+
This just adds an extra table entitled 'day_planner_log'. As long as the table's there, it'll log each task execution, as well as every instance in which DayPlanner activates. In addition, it logs each tasks's 'deviation' -- how late it ran, as compared to its previous run -- and the task's 'cumulative deviation', based on previous deviation values for that task's name. This makes it possible for the anxious taskmaster to track the task's runs over time and monitor "catchup" instances.
|
84
84
|
|
85
85
|
It may be worth considering clearing the log on every launch. You can add such instruction to your schedule file:
|
86
86
|
|
@@ -14,7 +14,7 @@ module DayPlanner
|
|
14
14
|
end
|
15
15
|
|
16
16
|
fields = {}
|
17
|
-
fields[:name] = options.delete(:name) if options[:name]
|
17
|
+
fields[:name] = options.delete(:name).to_s if options[:name]
|
18
18
|
fields[:interval] = options.delete(:every).to_i if options[:every]
|
19
19
|
|
20
20
|
task = DayPlanner::Task.create(fields)
|
data/lib/day_planner/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: day_planner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damon Siefert
|
@@ -106,9 +106,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: 1.9.0
|
107
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - '
|
109
|
+
- - '>='
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version:
|
111
|
+
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
114
|
rubygems_version: 2.0.14
|