Class: Tomo::Plugin::AwsSqs::Tasks

Inherits:
TaskLibrary
  • Object
show all
Defined in:
lib/tomo/plugin/aws_sqs/tasks.rb

Defined Under Namespace

Classes: SystemdUnit

Instance Method Summary collapse

Instance Method Details

#logObject



21
22
23
# File 'lib/tomo/plugin/aws_sqs/tasks.rb', line 21

def log
  remote.attach "journalctl", "-q", raw("--user-unit=#{service.name.shellescape}"), *settings[:run_args]
end

#setup_systemdObject



5
6
7
8
9
10
11
12
13
# File 'lib/tomo/plugin/aws_sqs/tasks.rb', line 5

def setup_systemd
  linger_must_be_enabled!

  remote.mkdir_p service.path.dirname
  remote.write template: service.template, to: service.path

  remote.run "systemctl --user daemon-reload"
  remote.run "systemctl", "--user", "enable", service.name
end