Class: Pipely::Build::RightNowScheduler

Inherits:
Object
  • Object
show all
Defined in:
lib/pipely/build/right_now_scheduler.rb

Overview

Compute schedule attributes for a pipeline that should run immediately after being deployed.

Instance Method Summary collapse

Instance Method Details

#periodObject



9
10
11
# File 'lib/pipely/build/right_now_scheduler.rb', line 9

def period
  '12 hours'
end

#start_date_timeObject



13
14
15
# File 'lib/pipely/build/right_now_scheduler.rb', line 13

def start_date_time
  Time.now.utc.strftime("%Y-%m-%dT%H:%M:%S")
end

#to_hashObject



17
18
19
20
21
22
# File 'lib/pipely/build/right_now_scheduler.rb', line 17

def to_hash
  {
    :period => period,
    :start_date_time => start_date_time
  }
end