2016-07-17 23:45:13 +05:30
|
|
|
[Unit]
|
|
|
|
Description=GitLab Sidekiq Worker
|
|
|
|
PartOf=gitlab.target
|
2022-07-01 14:34:55 +05:30
|
|
|
Wants=redis-server.service
|
2016-07-17 23:45:13 +05:30
|
|
|
Wants=postgresql.service
|
|
|
|
After=redis-server.service postgresql.service
|
|
|
|
PartOf=gitlab.service
|
|
|
|
ReloadPropagatedFrom=gitlab.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
WorkingDirectory=/usr/share/gitlab
|
|
|
|
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
|
|
|
|
SyslogIdentifier=gitlab-sidekiq
|
2021-02-19 14:12:52 +05:30
|
|
|
ExecStartPre=truncate -s 0 Gemfile.lock
|
2021-02-20 12:52:00 +05:30
|
|
|
ExecStartPre=/usr/bin/bundle install --local --quiet
|
2016-07-17 23:45:13 +05:30
|
|
|
ExecStart=/usr/bin/bundle exec sidekiq \
|
2016-12-07 23:40:47 +05:30
|
|
|
-C /etc/gitlab/sidekiq_queues.yml \
|
2016-07-17 23:45:13 +05:30
|
|
|
-e $RAILS_ENV
|
|
|
|
Restart=on-abnormal
|
|
|
|
|
|
|
|
## No "Type=notify" support; wait for service to initialise:
|
|
|
|
ExecStartPost=-/bin/sh -c "for i in 4 4 4 4 4 4 4 4; do sleep $i; (ps -h -o command -p $MAINPID | grep -q -P \"sidekiq\s\d\.\d\.\d\") && exit 0; done"
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=gitlab.target
|