mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-24 18:56:22 +00:00
Merge branch 'issue-13619' of https://0xacab.org/sutty/sutty into 17.3.alpine.panel.sutty.nl
This commit is contained in:
commit
58b0f8f408
1 changed files with 7 additions and 1 deletions
|
@ -223,7 +223,9 @@ class Site < ApplicationRecord
|
|||
# colecciones.
|
||||
def collections
|
||||
unless @read
|
||||
jekyll.reader.read_collections
|
||||
Site.one_at_a_time.synchronize do
|
||||
jekyll.reader.read_collections
|
||||
end
|
||||
|
||||
@read = true
|
||||
end
|
||||
|
@ -439,6 +441,10 @@ class Site < ApplicationRecord
|
|||
find_by(name: "#{Site.domain}.")
|
||||
end
|
||||
|
||||
def self.one_at_a_time
|
||||
@@one_at_a_time ||= Thread::Mutex.new
|
||||
end
|
||||
|
||||
def reset
|
||||
@read = false
|
||||
@layouts = nil
|
||||
|
|
Loading…
Reference in a new issue