Add 'last run' timestamps for recurring events, and take these into

account when firing events on daemon rescheduling (via HUP.)

FossilOrigin-Name: 1620e80e8bddd27741569dea0ff4bd84ba29429861ed49d17f5777c238ae4876
This commit is contained in:
mahlon@laika.com 2014-10-28 18:53:17 +00:00
parent b18647f6a5
commit 7c2954b0ad
6 changed files with 79 additions and 8 deletions

View file

@ -0,0 +1,23 @@
# vim: set nosta noet ts=4 sw=4:
### Add a 'lastrun' time stamp for recurring events.
###
class Lastrun < Sequel::Migration
def initialize( db )
@db = db
end
def up
if @db.adapter_scheme == :postgres
add_column :metronome, :lastrun, timestamptz
else
add_column :metronome, :lastrun, DateTime
end
end
def down
drop_column :metronome, :lastrun
end
end