summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/background_jobs7
-rwxr-xr-xbin/pngquant2
-rwxr-xr-xbin/sidekiq-cluster8
3 files changed, 9 insertions, 8 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
diff --git a/bin/pngquant b/bin/pngquant
index 8434e9d3ec9..a614814a8a3 100755
--- a/bin/pngquant
+++ b/bin/pngquant
@@ -5,7 +5,7 @@ require 'rails'
require 'png_quantizator'
require 'parallel'
require 'rainbow/ext/string'
-require_relative '../tooling/lib/tooling/images'
+require_relative '../tooling/lib/tooling/image'
return if Rails.env.production?
diff --git a/bin/sidekiq-cluster b/bin/sidekiq-cluster
index 47f8e82d228..db7833acdc9 100755
--- a/bin/sidekiq-cluster
+++ b/bin/sidekiq-cluster
@@ -1,13 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
-require 'optparse'
-require_relative '../lib/gitlab'
-require_relative '../lib/gitlab/utils'
-require_relative '../lib/gitlab/sidekiq_config/cli_methods'
-require_relative '../lib/gitlab/sidekiq_config/worker_matcher'
-require_relative '../lib/gitlab/sidekiq_cluster'
-require_relative '../lib/gitlab/sidekiq_cluster/cli'
+require_relative '../sidekiq_cluster/cli'
Thread.abort_on_exception = true