gitlab-org--gitlab-foss/spec
Nick Thomas f0c52df5e5 sidekiq: terminate child processes at shutdown
Sidekiq jobs frequently spawn long-lived child processes to do work.
In some circumstances, these can be reparented to init when sidekiq is
terminated, leading to duplication of work and strange concurrency
problems.

This commit changes sidekiq so that, if run as a process group leader,
it will forward `INT` and `TERM` signals to the whole process group. If
the memory killer is active, it will also use the process group when
resorting to `kill -9` to shut down.

These changes mean that a naive `kill <pid-of-sidekiq>` will now do the
right thing, killing any child processes spawned by sidekiq, as long as
the process supervisor placed it in its own process group.

If sidekiq isn't a process group leader, this new code is skipped.
2019-03-04 09:06:41 -08:00
..
bin
config Filter note parameters 2019-02-14 10:46:27 +02:00
controllers Merge branch 'sh-bump-fog-gem' into 'master' 2019-03-01 10:22:39 +00:00
db
dependencies
factories Fix inconsistent branch? behavior 2019-03-01 14:01:11 +09:00
features Merge branch 'web-ide-default-merge-request' into 'master' 2019-02-28 10:47:10 +00:00
finders Merge branch '54643-lower_issuable_finder_complexity' into 'master' 2019-03-01 09:17:29 +00:00
fixtures Fix misspellings in app/spec executable lines 2019-02-27 22:41:34 +09:00
frontend Add tests for labels dropdown to gfm_auto_complete_spec.js 2019-02-27 09:08:41 +01:00
graphql Improve GraphQL Authorization DSL 2019-02-26 10:22:12 +13:00
helpers Show header and footer system messages in email 2019-02-27 22:07:50 +02:00
initializers
javascripts Move EE differences in CE diff files into CE 2019-03-01 09:34:16 +00:00
lib sidekiq: terminate child processes at shutdown 2019-03-04 09:06:41 -08:00
mailers Show header and footer system messages in email 2019-02-27 22:07:50 +02:00
migrations Merge branch '57397-fixes-technical-debt-for-cluster-domain' into 'master' 2019-02-08 07:55:08 +00:00
models Fix inconsistent branch? behavior 2019-03-01 14:01:11 +09:00
policies Merge branch '42086-project-fetch-statistics-api-http-only' into 'master' 2019-02-27 12:07:05 +00:00
presenters Expose refspec and depth to runner 2019-02-25 13:40:15 +09:00
rack_servers
requests add tag_list param to runners api 2019-02-27 20:19:49 +01:00
routing Improve the GitHub and Gitea import feature table interface 2019-02-13 00:15:57 +00:00
rubocop
serializers Fix misspellings in app/spec executable lines 2019-02-27 22:41:34 +09:00
services Jira: Make issue links title compact 2019-02-28 09:46:09 +00:00
sidekiq/cron
support Show header and footer system messages in email 2019-02-27 22:07:50 +02:00
tasks Prepare test suite for switch to Gitaly-embedded Git hooks 2019-02-27 10:58:21 +00:00
uploaders Allow MR diffs to be placed into an object store 2019-02-05 14:12:48 +00:00
validators
views Freeze date in merge request status view spec 2019-02-28 17:21:01 -08:00
workers Add project http fetch statistics API 2019-02-27 11:52:35 +01:00
factories_spec.rb
fast_spec_helper.rb
rails_helper.rb
rake_helper.rb
simplecov_env.rb
spec_helper.rb