Skip to content

Commit

Permalink
configure redis before dynflow workers
Browse files Browse the repository at this point in the history
sometimes dynflow workers are started before redis, resulting in ugly
errors in the logs until redis is available
  • Loading branch information
evgeni committed Sep 17, 2021
1 parent d5c3c9f commit c43d0ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
} else {
include redis
$dynflow_redis_url = "redis://localhost:${redis::port}/6"
Class['redis'] -> Service <| tag == 'foreman::dynflow::worker' |>
}

file { '/etc/foreman/dynflow':
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/foreman_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@
# service
it { should contain_class('foreman::service') }
it { should contain_service('foreman') }
it { is_expected.to contain_service('dynflow-sidekiq@orchestrator').with_ensure('running').with_enable(true) }
it { is_expected.to contain_service('dynflow-sidekiq@worker-1').with_ensure('running').with_enable(true) }
it { is_expected.to contain_service('dynflow-sidekiq@orchestrator').with_ensure('running').with_enable(true).that_requires('Service[redis]') }
it { is_expected.to contain_service('dynflow-sidekiq@worker-1').with_ensure('running').with_enable(true).that_requires('Service[redis]') }

# settings
it { should contain_class('foreman::settings').that_requires('Class[foreman::database]') }
Expand Down

0 comments on commit c43d0ef

Please sign in to comment.