mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
PERF: only update etag when it changes
Previously when synchronizing upload etags we would update every single one regardless of change.
This commit is contained in:
parent
1fd3a30a59
commit
31976ecfeb
|
@ -58,8 +58,9 @@ class S3Inventory
|
||||||
connection.async_exec("UPDATE #{model.table_name}
|
connection.async_exec("UPDATE #{model.table_name}
|
||||||
SET etag = #{table_name}.etag
|
SET etag = #{table_name}.etag
|
||||||
FROM #{table_name}
|
FROM #{table_name}
|
||||||
WHERE #{model.table_name}.etag IS NULL
|
WHERE #{model.table_name}.etag IS NULL AND
|
||||||
AND #{model.table_name}.url = #{table_name}.url")
|
#{model.table_name}.etag <> #{table_name}.etag AND
|
||||||
|
#{model.table_name}.url = #{table_name}.url")
|
||||||
|
|
||||||
list_missing_post_uploads if type == "original"
|
list_missing_post_uploads if type == "original"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user