mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +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
|
if @wait_for_compilation
|
||||||
compile.call
|
compile.call
|
||||||
else
|
else
|
||||||
Thread.new &compile
|
fork &compile
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -124,7 +124,7 @@ post '/publish' do
|
||||||
return 'forbidden'
|
return 'forbidden'
|
||||||
end
|
end
|
||||||
|
|
||||||
Thread.new do
|
fork do
|
||||||
blog.publish(@fields['env'])
|
blog.publish(@fields['env'])
|
||||||
end
|
end
|
||||||
status 204
|
status 204
|
||||||
|
|
@ -210,7 +210,7 @@ post '/posts/drafts' do
|
||||||
if post = blog.create_post(title, body, link, id: id, draft: true)
|
if post = blog.create_post(title, body, link, id: id, draft: true)
|
||||||
if @fields['env']
|
if @fields['env']
|
||||||
post = blog.publish_post(post)
|
post = blog.publish_post(post)
|
||||||
Thread.new do
|
fork do
|
||||||
blog.publish(@fields['env'])
|
blog.publish(@fields['env'])
|
||||||
end
|
end
|
||||||
@wait_for_compilation = false
|
@wait_for_compilation = false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue