We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 374fa5b commit 837ca8fCopy full SHA for 837ca8f
src/api-umbrella/web-app/config/initializers/delayed_job.rb
@@ -1,3 +1,13 @@
1
+# Exit immediately when the delayed_job process receives a kill signal.
2
+#
3
+# This prevents some race conditions that can lead to API Umbrella stopping
4
+# taking a long time. If mongo is running on the same server and mongo exits
5
+# first, then without exiting immediately, delayed_job can get stuck waiting
6
+# for a new mongo primary (until the 30s server_selection_timeout is hit)
7
+# before exiting.
8
+Delayed::Worker.raise_signal_exceptions = true
9
+
10
+# Keep failed jobs in the database.
11
Delayed::Worker.destroy_failed_jobs = false
12
13
if(Rails.env.test?)
0 commit comments