Initial Redmine tooling and local plugin forks
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
class EventOutboxEvent < ActiveRecord::Base
|
||||
validates :event_type, :source_type, :source_id, :occurred_at, :payload, :presence => true
|
||||
|
||||
scope :pending, lambda { where(:processed_at => nil).order(:id) }
|
||||
|
||||
def payload_data
|
||||
ActiveSupport::JSON.decode(payload)
|
||||
rescue
|
||||
{}
|
||||
end
|
||||
|
||||
def payload_data=(data)
|
||||
self.payload = ActiveSupport::JSON.encode(data)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user