Class: TreasureData::Schedule
Instance Attribute Summary collapse
- #cron ⇒ Object readonly
- #database ⇒ Object readonly
- #delay ⇒ Object readonly
- #name ⇒ Object readonly
-
#org_name ⇒ Object
readonly
Returns the value of attribute org_name.
- #priority ⇒ Object readonly
- #query ⇒ Object readonly
- #result_url ⇒ Object readonly
- #retry_limit ⇒ Object readonly
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Attributes inherited from Model
Instance Method Summary collapse
-
#initialize(client, name, cron, query, database = nil, result_url = nil, timezone = nil, delay = nil, next_time = nil, priority = nil, retry_limit = nil, org_name = nil) ⇒ Schedule
constructor
A new instance of Schedule.
- #next_time ⇒ Time?
- #run(time, num) ⇒ Array
Constructor Details
#initialize(client, name, cron, query, database = nil, result_url = nil, timezone = nil, delay = nil, next_time = nil, priority = nil, retry_limit = nil, org_name = nil) ⇒ Schedule
Returns a new instance of Schedule.
693 694 695 696 697 698 699 700 701 702 703 704 705 706 |
# File 'lib/td/client/model.rb', line 693 def initialize(client, name, cron, query, database=nil, result_url=nil, timezone=nil, delay=nil, next_time=nil, priority=nil, retry_limit=nil, org_name=nil) super(client) @name = name @cron = cron @query = query @database = database @result_url = result_url @timezone = timezone @delay = delay @next_time = next_time @priority = priority @retry_limit = retry_limit end |
Instance Attribute Details
#cron ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#database ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#delay ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#name ⇒ Object (readonly)
717 718 719 |
# File 'lib/td/client/model.rb', line 717 def name @name end |
#org_name ⇒ Object (readonly)
Returns the value of attribute org_name.
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#priority ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#query ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#result_url ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#retry_limit ⇒ Object (readonly)
717 |
# File 'lib/td/client/model.rb', line 717 attr_reader :name, :cron, :query, :database, :result_url, :timezone, :delay, :priority, :retry_limit, :org_name |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
717 718 719 |
# File 'lib/td/client/model.rb', line 717 def timezone @timezone end |
Instance Method Details
#next_time ⇒ Time?
720 721 722 |
# File 'lib/td/client/model.rb', line 720 def next_time @next_time ? Time.parse(@next_time) : nil end |
#run(time, num) ⇒ Array
727 728 729 |
# File 'lib/td/client/model.rb', line 727 def run(time, num) @client.run_schedule(@name, time, num) end |