Class: Schked::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/schked/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failure?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/schked/cli.rb', line 21

def self.exit_on_failure?
  true
end

.start(argv) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/schked/cli.rb', line 8

def self.start(argv)
  if File.exist?(".schked")
    argv += File
      .read(".schked")
      .split("\n")
      .join(" ")
      .strip
      .shellsplit
  end

  super
end

Instance Method Details

#showObject



42
43
44
45
46
47
48
# File 'lib/schked/cli.rb', line 42

def show
  load_requires

  puts "====="
  puts Schked.worker.schedule
  puts "====="
end

#startObject



33
34
35
36
37
38
# File 'lib/schked/cli.rb', line 33

def start
  load_requires
  apply_liveness_probe_options

  Schked.worker.wait
end