diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-18 16:16:36 +0300 |
commit | 311b0269b4eb9839fa63f80c8d7a58f32b8138a0 (patch) | |
tree | 07e7870bca8aed6d61fdcc810731c50d2c40af47 /bin/background_jobs | |
parent | 27909cef6c4170ed9205afa7426b8d3de47cbb0c (diff) |
Add latest changes from gitlab-org/gitlab@14-5-stable-eev14.5.0-rc42
Diffstat (limited to 'bin/background_jobs')
-rwxr-xr-x | bin/background_jobs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/background_jobs b/bin/background_jobs index f9b42b97e06..d8929881f12 100755 --- a/bin/background_jobs +++ b/bin/background_jobs @@ -8,6 +8,8 @@ sidekiq_pidfile="$app_root/tmp/pids/sidekiq-cluster.pid" sidekiq_logfile="$app_root/log/sidekiq.log" gitlab_user=$(ls -l config.ru | awk '{print $3}') +trap cleanup EXIT + warn() { echo "$@" 1>&2 @@ -59,6 +61,11 @@ start_sidekiq() ${cmd} bin/sidekiq-cluster "${processes_args[@]}" -P $sidekiq_pidfile -e $RAILS_ENV "$@" 2>&1 | tee -a $sidekiq_logfile } +cleanup() +{ + stop +} + action="$1" shift |