Skip to content

Commit

Permalink
PISTON-953: no need to flush endpoint cache after doc updates (2600hz…
Browse files Browse the repository at this point in the history
…#6126)

* PISTON-953: no need to flush endpoint cache after doc updates

Flush should only flush the endpoint cache and callers of the fun do not
need to do so as they are performing a doc update anyway. Recent changes
to kazoo_caches remove this need.
  • Loading branch information
danielfinke authored and lazedo committed Nov 2, 2019
1 parent 9181c86 commit 47657db
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions applications/callflow/src/callflow_maintenance.erl
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ set_account_classifier_action(Action, Classifier, AccountDb) ->
Update = [{[<<"call_restriction">>, Classifier, <<"action">>], Action}],
{'ok', _} = kzd_accounts:update(AccountId, Update),

kz_endpoint:flush_account(AccountDb),

io:format(" ... classifier '~s' switched to action '~s'\n", [Classifier, Action]).

-spec all_accounts_set_classifier(kz_term:ne_binary(), kz_term:ne_binary()) -> 'ok'.
Expand Down Expand Up @@ -355,8 +353,7 @@ set_device_classifier_action(Action, Classifier, Uri) ->
UpdateOptions = [{'update', Update}],

{'ok', _} = kz_datamgr:update_doc(AccountDb, DeviceId, UpdateOptions),

kz_endpoint:flush(AccountDb, DeviceId).
'ok'.

%%------------------------------------------------------------------------------
%% @doc Checks if classifier defined in `system_config -> number_manager' doc.
Expand Down

0 comments on commit 47657db

Please sign in to comment.