Sha256: 459e908db560492e4c26b0e47914ae42017a0e3a9d6ef5a0bd2e0e8d0c856834

Contents?: true

Size: 709 Bytes

Versions: 2

Compression:

Stored size: 709 Bytes

Contents

require 'hako/scheduler'

module Hako
  module Schedulers
    class Echo < Scheduler
      def initialize(app_id, _options)
        @app_id = app_id
      end

      def deploy(app, env, app_port, _front, force: false)
        puts "Deploy #{app.image_tag} with app_port=#{app_port}, force=#{force}"
        puts 'Environment variables:'
        env.each do |key, val|
          puts "  #{key}=#{val.inspect}"
        end
      end

      def oneshot(app, env, commands)
        puts "Run #{app.image_tag} with oneshot commands=#{commands.inspect}"
        puts 'Environment variables:'
        env.each do |key, val|
          puts "  #{key}=#{val.inspect}"
        end
        0
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hako-0.3.1 lib/hako/schedulers/echo.rb
hako-0.3.0 lib/hako/schedulers/echo.rb