Class: Tomo::Plugin::Sidekiq::Tasks
- Inherits:
-
TaskLibrary
- Object
- TaskLibrary
- Tomo::Plugin::Sidekiq::Tasks
- Defined in:
- lib/tomo/plugin/sidekiq/tasks.rb
Defined Under Namespace
Classes: SystemdUnit
Instance Method Summary collapse
Instance Method Details
#log ⇒ Object
21 22 23 |
# File 'lib/tomo/plugin/sidekiq/tasks.rb', line 21 def log remote.attach "journalctl", "-q", raw("--user-unit=#{service.name.shellescape}"), *settings[:run_args] end |
#setup_systemd ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/tomo/plugin/sidekiq/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 |