discourse/config/initializers
Alan Guo Xiang Tan cb63c297b3
DEV: Warm ActiveRecord cache for Sidekiq after Rails initializes. (#14253)
Sidekiq was failing to boot in dev due to the following error. It seems
like constantizing stuff before the autoloader has kicked in caused
stuff to go weird. Root cause has not been identified but there is no
reason for us to have to warm up the cache during the initialization of
Rails.

```
2021-09-06T04:28:43.338Z pid=112028 tid=26vc WARN: NameError: uninitialized constant #<Class:0x0000564b365040d8>::RateLimiter
2021-09-06T04:28:43.338Z pid=112028 tid=26vc WARN: /discourse/app/models/post.rb:9:in `<class:Post>'
/discourse/app/models/post.rb:6:in `<top (required)>'
/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
/ruby/2.7.4/lib/ruby/gems/2.7.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:26:in `require'
```
2021-09-07 11:08:32 +08:00
..
001-redis.rb DEV: Disable Redis warnings. 2020-06-16 12:53:04 +08:00
002-freedom_patches.rb FIX: deprecation warning - initialization autoloaded the constant (#12400) 2021-03-16 09:47:57 +11:00
002-rails_failover.rb FIX: Improve failover for multisite clusters (#11150) 2020-11-11 10:27:24 +00:00
003-sql_builder.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
004-message_bus.rb DEV: Log env on error when looking up user in message_bus. (#13208) 2021-06-01 11:15:26 +10:00
005-site_settings.rb FIX: Ensure 100-logster initializer is run before 101-lograge (#12455) 2021-03-19 19:51:13 +00:00
006-ensure_login_hint.rb FEATURE: SKIP_DB_AND_REDIS env var (#7756) 2019-06-13 12:58:27 +10:00
006-mini_profiler.rb DEV: Increase number of mini-profiler traces in development. 2021-06-10 21:58:27 +08:00
008-rack-cors.rb DEV: use request_path instead of script_name to find static file requests. (#11986) 2021-02-05 09:09:55 +05:30
009-omniauth.rb DEV: Drop legacy OpenID 2.0 support (#8894) 2020-02-07 17:32:35 +00:00
012-web_hook_events.rb FIX: Do not call :post_edited webhook twice when editing OP (#13112) 2021-05-24 09:10:22 +10:00
013-excon_defaults.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
014-track-setting-changes.rb DEV: Compile core and plugin stylesheets independently of themes (#13638) 2021-07-06 13:11:10 -04:00
099-anon-cache.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
099-drain_pool.rb DEV: Remove custom connection reaper. 2020-05-26 09:09:46 +08:00
100-i18n.rb FIX: Ensure 100-logster initializer is run before 101-lograge (#12455) 2021-03-19 19:51:13 +00:00
100-logster.rb DEV: Bump Logster and use full hostnames (#13617) 2021-07-02 11:02:58 -04:00
100-oj.rb DEV: default Oj to compat mode 2020-01-16 07:52:28 +11:00
100-onebox_options.rb FIX: include onebox default options in development environment 2019-11-07 15:42:53 +05:30
100-push-notifications.rb FIX: Make initializer work on first db:migrate 2019-07-30 10:23:24 +02:00
100-quiet_logger.rb DEV: Increase log levels for more assets/static paths. 2020-09-01 09:52:50 +08:00
100-secret_token.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-session_store.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-sidekiq.rb DEV: Warm ActiveRecord cache for Sidekiq after Rails initializes. (#14253) 2021-09-07 11:08:32 +08:00
100-silence_logger.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
100-strong_parameters.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-verify_config.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
100-watch_for_restart.rb DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00
100-wrap_parameters.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
101-lograge.rb DEV: Rescue from ActiveRecord::Readonly error in lograge. 2020-06-25 10:25:28 +08:00
200-first_middlewares.rb DEV: Correct spelling mistakes in comments 2021-05-21 13:37:17 +10:00
300-perf.rb FEATURE: add hook after all initializers 2019-08-26 10:49:26 +10:00
400-deprecations.rb FIX: use Redis replica host and port (#11566) 2020-12-23 13:14:19 +11:00
000-development_reload_warnings.rb DEV: Improve auto-restart parent process detection logic (#13068) 2021-05-14 18:17:31 +01:00
000-mini_sql.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
000-post_migration.rb FIX: Migration paths were being forgotten 2019-12-16 14:13:47 -05:00
000-trace_pg_connections.rb DEV: Silence spurious rubocop lint warning 2020-02-19 13:10:30 +11:00