Merge branch 'bug/insert-search-data-async' into 'master'
Make inserting data into search table an async operation See merge request framasoft/mobilizon!296
This commit is contained in:
commit
f2c945d23a
@ -247,7 +247,7 @@ defmodule Mobilizon.Events do
|
|||||||
role: :creator,
|
role: :creator,
|
||||||
event_id: event.id
|
event_id: event.id
|
||||||
}) do
|
}) do
|
||||||
Search.insert_search_event(event)
|
Task.start(fn -> Search.insert_search_event(event) end)
|
||||||
{:ok, event}
|
{:ok, event}
|
||||||
else
|
else
|
||||||
# We don't create a creator participant if the event is a draft
|
# We don't create a creator participant if the event is a draft
|
||||||
@ -299,7 +299,7 @@ defmodule Mobilizon.Events do
|
|||||||
changes
|
changes
|
||||||
)
|
)
|
||||||
|
|
||||||
Search.update_search_event(new_event)
|
Task.start(fn -> Search.update_search_event(new_event) end)
|
||||||
|
|
||||||
{:ok, new_event}
|
{:ok, new_event}
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user