day_planner 0.1.0.pre5.1 → 0.1.0.pre6.1

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
  SHA1:
3
- metadata.gz: 84ea53ef9ee61558d913d63d5b8e2fc7aad47946
4
- data.tar.gz: bb3f02b7d0751832d57c33ac6b472bd29e566d21
3
+ metadata.gz: 8d544914bc41dc8680a5dcbdb16e25d057db5f7c
4
+ data.tar.gz: e44d7fbc3890aa8b653c7c364ad971f9a6169efa
5
5
  SHA512:
6
- metadata.gz: 8f60b4ccb2e55e27a23a0735101737f7c52d24bacfd606159948f009e06d55fb648fab19c6accfe76d3d402ea19c464cc4136d9afd6edf3db4e4509e4db29adb
7
- data.tar.gz: 76137ccb8aeeb5c7b44f61ac3ff8f19b390d55f4bcea16908246f0766b03acc428ecfd381cab95927b458050b6bd6304986ec23157335c87e8d998bb54232f09
6
+ metadata.gz: 164909dfe43a45024a76685cbb1788abdd92bebd4dbc3a96c861dd5604a4f03d445794d45b8cbb940e96d8f03d221356c77fb224c51619441ad220f95815f567
7
+ data.tar.gz: a94ef5790e6d5c9a702e91d0f4d9dec105067e3325118f4f11ebee918bb5a857259019df288c8f9fc8d29eada95849f18e1b65c3b5238bbf5c22483fba87cc77
data/PLANS.md ADDED
@@ -0,0 +1,25 @@
1
+ ## For future releases ##
2
+
3
+ ### Track tasks across application launch instances ###
4
+ This is basically a gimme as long as we're already recording stuff in a database:
5
+ * Delete only anonymous tasks on initialize, don't delete anything with a persistent name and interval
6
+ ** But do delete any task with an unfamiliar name or name, interval combo
7
+ * Don't worry about task content changing. Fine, change it. We don't store that in a database anyway.
8
+ * Don't reinitialize persistent events, just keep them on schedule. This helps especially if e.g. dealing with a pricy API -- why pull more often than needed?
9
+
10
+ ### Log each tasks's history ###
11
+ HIGH PRIORITY: I want to be able to monitor the elaborate new scheduling algorithm appropriately. This needs to be optional, but it would be nice to have the ability to monitor at least how well the task adheres to the timeline.
12
+
13
+ ### Attempt some degree of control with multi-process instances ###
14
+ Not sure exactly how to do this.
15
+ * Store a record of the scheduler's execution status in a database? Then use that to avoid it being unnecessarily run in multiple threads?
16
+ * Hell, even an optional "view scheduler status" page in the app. Why not?
17
+
18
+ ### Some degree of DB independence ###
19
+ This needs to wait until we have the multi-process thing down.
20
+ * Set a separate interval for updating the DB, and in between just use in-memory stuff?
21
+ ** This probably would need to be done on some sort of basis of strict multiples, i.e. every 6th tick, update the database. Make sure that we can be okay with circumstances in which the DB is not up to date. (Tasks might resume unnecessarily soon, etc., but shit, do I care?)
22
+ * The value of this is when the interval is quite low, at which point both the DB usage and the time that the queries take starts dominating the scene
23
+
24
+ ### Other task scheduling techniques ###
25
+ Something cronesque, but not so annoying. Maybe options like hourly, daily, weekly, accompanied (optionally) by at, or on. These would need different logic from our "every", try-to-stay-on-task style items.
@@ -5,12 +5,14 @@ module DayPlanner
5
5
  class Railtie < Rails::Engine
6
6
  isolate_namespace DayPlanner
7
7
 
8
- unless $0 =~ /rake/ || defined?(::Rails::Console) || !defined?(Rails.env) || !Rails.env.production?
9
- initializer "day_planner.activate", after: :finisher_hook do
10
- puts "DayPlanner starting up"
11
- DayPlanner.clear_tasks
12
- require Rails.root.join('config', 'scheduled_tasks')
13
- DayPlanner.activate
8
+ unless $0 =~ /rake/ !defined?(Rails.env) || !Rails.env.production?
9
+ unless defined?(::Rails::Console) || ENV['EXECUTE_SCHEDULED_TASKS_IN_CONSOLE']
10
+ initializer "day_planner.activate", after: :finisher_hook do
11
+ puts "DayPlanner starting up"
12
+ DayPlanner.clear_tasks
13
+ require Rails.root.join('config', 'scheduled_tasks')
14
+ DayPlanner.activate
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -2,7 +2,7 @@ module DayPlanner
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
4
  TINY = 0
5
- PRE = "pre5"
5
+ PRE = "pre6"
6
6
  BUILD = 1
7
7
 
8
8
  VERSION = [MAJOR, MINOR, TINY, PRE, BUILD].compact.join(".")
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.pre5.1
4
+ version: 0.1.0.pre6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damon Siefert
@@ -77,6 +77,7 @@ files:
77
77
  - Gemfile
78
78
  - LICENSE
79
79
  - LICENSE.txt
80
+ - PLANS.md
80
81
  - README.md
81
82
  - Rakefile
82
83
  - app/models/day_planner/task.rb