HG-473: optimize memory consuption by dmt_client (#309)

This commit is contained in:
Sergei 2019-04-25 16:20:12 +03:00 committed by GitHub
parent f5ca672f3f
commit 73d4043b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -39,8 +39,7 @@
-spec head() -> revision().
head() ->
#'Snapshot'{version = Version} = dmt_client:checkout({head, #'Head'{}}),
Version.
dmt_client:get_last_version().
-spec all(revision()) -> dmsl_domain_thrift:'Domain'().
@ -54,7 +53,7 @@ get(Revision, Ref) ->
try
extract_data(dmt_client:checkout_object({version, Revision}, Ref))
catch
throw:object_not_found ->
throw:#'ObjectNotFound'{} ->
error({object_not_found, {Revision, Ref}})
end.
@ -64,7 +63,7 @@ find(Revision, Ref) ->
try
extract_data(dmt_client:checkout_object({version, Revision}, Ref))
catch
throw:object_not_found ->
throw:#'ObjectNotFound'{} ->
notfound
end.
@ -75,7 +74,7 @@ exists(Revision, Ref) ->
_ = dmt_client:checkout_object({version, Revision}, Ref),
true
catch
throw:object_not_found ->
throw:#'ObjectNotFound'{} ->
false
end.

View File

@ -14,11 +14,11 @@
0},
{<<"dmt_client">>,
{git,"git@github.com:rbkmoney/dmt_client.git",
{ref,"2d122747132c6c1d158ea0fb4c84068188541eff"}},
{ref,"635dc0fb1928cfc8f81a17eddfffde0edfbf84a5"}},
0},
{<<"dmt_core">>,
{git,"git@github.com:rbkmoney/dmt_core.git",
{ref,"045c78132ecce5a8ec4a2e6ccd2c6b0b65bade1f"}},
{ref,"357066d8be36ce1032d2d6c0d4cb31eb50730335"}},
1},
{<<"erl_health">>,
{git,"https://github.com/rbkmoney/erlang-health.git",