mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
Revert "BUGFIX: raise message bus messages after data is committed"
This reverts commit d2926424d65dbf21fae1814eb67a7f2db9294f5b.
This commit is contained in:
parent
eff20fdda7
commit
eff8b48da9
@ -41,8 +41,7 @@ class SiteCustomization < ActiveRecord::Base
|
||||
end
|
||||
end
|
||||
|
||||
# calls message bus, data must be committed
|
||||
after_commit(on: :save) do
|
||||
after_save do
|
||||
if stylesheet_changed?
|
||||
File.delete(stylesheet_fullpath) if File.exists?(stylesheet_fullpath)
|
||||
end
|
||||
@ -56,9 +55,10 @@ class SiteCustomization < ActiveRecord::Base
|
||||
MessageBus.publish "/file-change/#{key}", stylesheet_hash
|
||||
end
|
||||
MessageBus.publish "/header-change/#{key}", header if header_changed?
|
||||
|
||||
end
|
||||
|
||||
after_commit(on: :destroy) do
|
||||
after_destroy do
|
||||
if File.exists?(stylesheet_fullpath)
|
||||
File.delete stylesheet_fullpath
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user