File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 81
81
# Prevent health checks from clogging up the logs.
82
82
config . silence_healthcheck_path = "/up"
83
83
84
+ # Set up GoodJob for async execution in development mode
85
+ config . good_job . execution_mode = :async
86
+
84
87
# Enable strict loading to catch N+1 problems.
85
88
config . active_record . strict_loading_by_default = true
86
89
config . active_record . strict_loading_mode = :n_plus_one_only
Original file line number Diff line number Diff line change 57
57
# processes).
58
58
workers Settings . web_concurrency
59
59
60
- if Settings . web_concurrency > 1
61
- # Cleanly shut down GoodJob when Puma is shut down.
62
- # See https://github.com/bensheldon/good_job#execute-jobs-async--in-process
63
- MAIN_PID = Process . pid
64
- before_fork { GoodJob . shutdown }
65
- on_worker_boot { GoodJob . restart }
66
- on_worker_shutdown { GoodJob . shutdown }
67
- at_exit { GoodJob . shutdown if Process . pid == MAIN_PID }
68
-
69
- # Use the `preload_app!` method when specifying a `workers` number.
70
- # This directive tells Puma to first boot the application and load code
71
- # before forking the application. This takes advantage of Copy On Write
72
- # process behavior so workers use less memory.
73
- preload_app!
74
- end
75
-
76
60
# Re-open appenders after forking the process; needed for Semantic Logger
77
61
on_worker_boot { SemanticLogger . reopen }
You can’t perform that action at this time.
0 commit comments