mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
fork instead of Thread.new
This commit is contained in:
parent
4787bd8206
commit
3520059ff7
1 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ after do
|
|||
if @wait_for_compilation
|
||||
compile.call
|
||||
else
|
||||
Thread.new &compile
|
||||
fork &compile
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ post '/publish' do
|
|||
return 'forbidden'
|
||||
end
|
||||
|
||||
Thread.new do
|
||||
fork do
|
||||
blog.publish(@fields['env'])
|
||||
end
|
||||
status 204
|
||||
|
|
@ -210,7 +210,7 @@ post '/posts/drafts' do
|
|||
if post = blog.create_post(title, body, link, id: id, draft: true)
|
||||
if @fields['env']
|
||||
post = blog.publish_post(post)
|
||||
Thread.new do
|
||||
fork do
|
||||
blog.publish(@fields['env'])
|
||||
end
|
||||
@wait_for_compilation = false
|
||||
|
|
|
|||
Loading…
Reference in a new issue