demarches-normaliennes/config/initializers
Pierre de La Morinerie 75a1046315 active_storage: refactor concerns
Follow-up of #5953.

Refactor the concerns with two goals:

- Getting closer from the way ActiveStorage adds its own hooks.
  Usually ActiveStorage does this using an `Attachment#after_create`
  hook, which then delegates to the blob to enqueue the job.
- Enqueuing each job only once. By hooking on `Attachment#after_create`,
  we guarantee each job will be added only once.

We then let the jobs themselves check if they are relevant or not, and
retry or discard themselves if necessary.

We also need to update the tests a bit, because Rails'
`perform_enqueued_jobs(&block)` test helper doesn't honor the `retry_on`
clause of jobs. Instead it forwards the exception to the caller – which
makes the test fail.

Instead we use the inline version of `perform_enqueued_jobs()`, without
a block, which properly ignores errors catched by retry_on.
2021-03-16 11:49:14 +01:00
..
01_application_name.rb config: move application_name to an initializer 2021-02-24 15:06:55 +01:00
active_job_compatibility.rb config: fix zeitwekr warning when reloading the app 2021-02-24 19:01:27 +01:00
active_job_log_subscriber.rb Avoid EOL ifs 2019-01-03 10:53:50 +01:00
active_model_serializer.rb Files should end with a new line 2017-04-04 16:59:38 +02:00
active_storage.rb active_storage: refactor concerns 2021-03-16 11:49:14 +01:00
after_party.rb Enable the Lint/UnusedBlockArgument cop 2019-01-03 10:53:50 +01:00
application_controller_renderer.rb Rails app:update 2020-07-07 18:03:56 +02:00
assets.rb stylesheets: merge print rules with the application stylesheet 2021-02-24 17:09:51 +01:00
authorized_content_types.rb Add authorized content type for pj 2021-01-18 17:23:08 +01:00
backtrace_silencers.rb First Commit 2015-08-10 11:05:06 +02:00
chartkick.rb stats: improve numeric separators and suffixes 2019-02-01 11:02:37 +01:00
contacts.rb allow mailers/_bizdev_signature to be configured in .env file 2021-02-04 13:09:40 +01:00
content_security_policy.rb Add annuaire_education champ ui 2021-01-14 17:57:48 +01:00
cookies_serializer.rb Rails app:update 2020-07-07 18:03:56 +02:00
core_ext.rb zeitwerk: move our Array extension to initializers/core_ext 2021-02-11 12:30:43 +01:00
date_select.rb fix display of labels for datetime on screenreaders 2020-07-20 11:37:01 +02:00
devise.rb add recoverable and two_factor stragegy for administration 2020-11-05 16:03:55 +01:00
dynamic_smtp_settings_interceptor.rb config: fix DynamicSmtpSettingsInterceptor warning again 2021-03-04 22:52:19 +01:00
env_vars.rb Enable the Lint/UnusedBlockArgument cop 2019-01-03 10:53:50 +01:00
excon_setup.rb Fix uninitialized excon constant 2020-09-08 18:36:24 +02:00
filter_parameter_logging.rb First Commit 2015-08-10 11:05:06 +02:00
flipper.rb Hide groupe instructeur selector when routage is done via API 2021-03-04 11:06:04 +01:00
france_connect.rb [ENV] France connect particulier config in secrets.yml 2018-08-23 15:55:31 +02:00
geocoder.rb Add api address external data fetch 2021-02-17 19:10:16 +01:00
graphql.rb added application name in config/ 2020-07-23 16:17:54 +02:00
groupdate.rb stats: make groupdate week start on Monday 2019-01-10 16:14:14 +01:00
images.rb allow email footer logo to be configured in .env file 2021-02-09 09:39:02 +01:00
inflections.rb zeitwerk: add inflections 2021-02-09 13:09:10 +01:00
lograge.rb Use parentheses 2019-01-03 10:53:50 +01:00
mailjet.rb [ENV] Add Mailjet conf 2018-08-23 15:55:32 +02:00
mime_types.rb First Commit 2015-08-10 11:05:06 +02:00
open_id_connect.rb Files should end with a new line 2017-04-04 16:59:38 +02:00
passwords.rb Rename gestionnaire to instructeur in a comment 2019-08-13 10:27:49 +02:00
pg_interval_5_2.rb add interval data type to ActiveRecord 2020-03-24 18:10:13 +01:00
phonelib.rb refuse les numéros de tel invalides 2019-12-04 05:34:43 +01:00
rack.rb [fix #2387] Rack: increase max multipart number 2018-08-13 17:45:47 +02:00
rack_attack.rb Use rack_attack_enabled? 2019-08-20 13:29:29 +02:00
rack_attack_request.rb RackAttack: use remote ip and test it ! 2019-08-20 13:29:29 +02:00
rack_mini_profiler.rb Remove rack_mini_profiler from prod as it could show env var and force us to allow unsafe_eval and script in csp 2020-10-30 17:08:31 +01:00
saml_idp.rb act as an saml identity provider 2020-11-16 12:19:54 +01:00
sendinblue.rb ajout de la gem sendinblue 2020-10-13 17:36:43 +02:00
sentry.rb config: disable Sentry sampling when not enabled 2021-02-24 17:45:18 +01:00
session_store.rb Change the cookie key 2018-03-01 10:33:53 +01:00
smart_listing.rb Bump development gems 2019-01-05 11:47:55 +01:00
typhoeus.rb added application name in config/ 2020-07-23 16:17:54 +02:00
urls.rb Add api education adapter and job 2021-01-14 17:57:48 +01:00
watermark.rb Make watermark configurable 2020-11-25 16:19:06 +01:00
wrap_parameters.rb First Commit 2015-08-10 11:05:06 +02:00
zxcvbn.rb [Fix #1285] Add a custom dictionary for zxcvbn 2018-09-26 09:02:59 +02:00
zxcvbn_dictionnaries.yaml [Fix #1285] Add a custom dictionary for zxcvbn 2018-09-26 09:02:59 +02:00