diff --git a/README.md b/README.md index fc3bb73..e70883b 100644 --- a/README.md +++ b/README.md @@ -232,8 +232,6 @@ progress from there. Existing calls will be looked up in an ETS table managed by #### Under the Hood -- `CallProcessor.process/3` spins off a new process to do the actual call - processing for maximum concurrency. - The current state of all ongoing calls is stored in the ETS table managed by the `Telephonist.OngoingCall` process. See its docs for more details. diff --git a/lib/telephonist/call_processor.ex b/lib/telephonist/call_processor.ex index 080ba53..c7049a7 100644 --- a/lib/telephonist/call_processor.ex +++ b/lib/telephonist/call_processor.ex @@ -1,6 +1,5 @@ defmodule Telephonist.CallProcessor do alias Telephonist.OngoingCall - import Task, only: [async: 1, await: 1] import Telephonist.Event, only: [notify: 2] import Telephonist.Format, only: [atomize_keys: 1] @@ -45,13 +44,8 @@ defmodule Telephonist.CallProcessor do def process(machine, twilio, options \\ %{}) do twilio = atomize_keys(twilio) notify :processing, {machine, twilio, options} - - result = async fn -> - call = lookup(twilio) - do_processing(call, machine, twilio, options) - end - - await result + call = lookup(twilio) + do_processing(call, machine, twilio, options) end defp lookup(twilio) do