Sha256: d5e160671d805e72f36b10f1a080c433651c36922e2a6d08f7f0042c5ffd205b

Contents?: true

Size: 555 Bytes

Versions: 4

Compression:

Stored size: 555 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: 1, status: 1
  index status: 1
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tengine_core-1.2.2 lib/tengine/core/schedule.rb
tengine_core-1.2.1 lib/tengine/core/schedule.rb
tengine_core-1.2.0 lib/tengine/core/schedule.rb
tengine_core-1.1.0 lib/tengine/core/schedule.rb