Sha256: 50b2015bd52994a93d60f3b40cf4dd6b01ece5364e29d82c88c06d43753f6bf2

Contents?: true

Size: 621 Bytes

Versions: 11

Compression:

Stored size: 621 Bytes

Contents

# -*- coding: utf-8 -*-
require 'tengine/core'

class Tengine::Core::Schedule
  include Mongoid::Document
  include Mongoid::Timestamps

  # statuses
  SCHEDULED = 0
  INVALID   = 1
  FIRED     = 2

  field :event_type_name, :type => String
  field :scheduled_at   , :type => Time   , :default => proc { Time.now }
  field :status         , :type => Integer, :default => SCHEDULED
  field :source_name    , :type => String
  field :properties     , :type => Hash   , :default => proc { Hash.new }

  index([ [:scheduled_at, Mongo::ASCENDING], [:status, Mongo::ASCENDING], ])
  index([ [:status, Mongo::ASCENDING], ])
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
tengine_core-0.5.39 lib/tengine/core/schedule.rb
tengine_core-0.5.38 lib/tengine/core/schedule.rb
tengine_core-0.5.37 lib/tengine/core/schedule.rb
tengine_core-0.5.36 lib/tengine/core/schedule.rb
tengine_core-0.5.35 lib/tengine/core/schedule.rb
tengine_core-0.5.34 lib/tengine/core/schedule.rb
tengine_core-0.5.33 lib/tengine/core/schedule.rb
tengine_core-0.5.32 lib/tengine/core/schedule.rb
tengine_core-0.5.31 lib/tengine/core/schedule.rb
tengine_core-0.5.30 lib/tengine/core/schedule.rb
tengine_core-0.5.28 lib/tengine/core/schedule.rb