My function:
%Client{}
|> Client.changeset(%{user_id: user_id, region_id: region_id})
|> Repo.insert
return {:ok, client}
Then I send the task to the external system ImportClientInfo.run(client.id), it returns an error: RecordNotFound: Couldn’t find Client with id
Can I request a response to be returned only after the transaction is completed in the database.
My Database - postgresql
Thank you and I apologize for using google translate