discourse/spec
David Taylor bf6f8299a7 FEATURE: Pull hotlinked images immediately after posting
Previously, with the default `editing_grace_period`, hotlinked images were pulled 5 minutes after a post is created. This delay was added to reduce the chance of automated edits clashing with user edits.

This commit refactors things so that we can pull hotlinked images immediately. URLs are immediately updated in the post's `cooked` HTML. The post's raw markdown is updated later, after the `editing_grace_period`.

This involves a number of behind-the-scenes changes including:

- Schedule Jobs::PullHotlinkedImages immediately after Jobs::ProcessPost. Move scheduling to after the `update_column` call to avoid race conditions

- Move raw changes into a separate job, which is delayed until after the ninja-edit window

- Move disable_if_low_on_disk_space logic into the `pull_hotlinked_images` job

- Move raw-parsing/replacing logic into `InlineUpload` so it can be easily be shared between `UpdateHotlinkedRaw` and `PullUserProfileHotlinkedImages`
2022-05-23 14:28:02 +01:00
..
fabricators FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00
fixtures FIX: Missing translation when translation override contained a `%{key}` (#16625) 2022-05-04 17:35:22 +02:00
helpers DEV: Allow Ember CLI assets to be used by development Rails app (#16511) 2022-04-21 16:26:34 +01:00
import_export DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
initializers DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
integration FIX: Use our header value instead of custom header on duplicates (#16711) 2022-05-11 13:47:12 +10:00
integrity DEV: Upgrade to Rails 7 2022-04-28 11:51:03 +02:00
jobs FEATURE: Pull hotlinked images immediately after posting 2022-05-23 14:28:02 +01:00
lib FEATURE: Pull hotlinked images immediately after posting 2022-05-23 14:28:02 +01:00
mailers FEATURE: Site setting to cap the recipient list in notification emails 2022-04-21 10:43:13 +02:00
models FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00
multisite DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00
requests FIX: Applying default user options didn't work for boolean flags (#16890) 2022-05-23 15:20:51 +02:00
script/import_scripts FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00
serializers FEATURE: Promote polymorphic bookmarks to default and migrate (#16729) 2022-05-23 10:07:15 +10:00
services FIX: Site setting changes for boolean should be logged as true/false (#16888) 2022-05-23 11:23:10 +08:00
support FIX: Allow .ics for polymorphic bookmarks (#16694) 2022-05-11 09:29:24 +10:00
tasks PERF: Speed up secure media and ACL sync rake tasks (#16849) 2022-05-23 13:14:11 +10:00
views DEV: Upgrade to Rails 7 2022-04-28 11:51:03 +02:00
rails_helper.rb DEV: Don't cache watched words in test env (#16731) 2022-05-12 14:45:05 +08:00
regenerate_swagger_docs DEV: Add API docs for uploads and API doc watcher (#15387) 2021-12-23 08:40:15 +10:00
swagger_helper.rb DEV: Automatically require 'rails_helper' in all specs (#16077) 2022-03-01 17:50:50 +00:00