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:
parent
b18647f6a5
commit
7c2954b0ad
6 changed files with 79 additions and 8 deletions
23
data/symphony-metronome/migrations/20141028_lastrun.rb
Normal file
23
data/symphony-metronome/migrations/20141028_lastrun.rb
Normal 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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue