Remove get_erase_logevent_promise debug.

GitOrigin-RevId: 06ed913e54f6d257243717568a706e3d1124a9b2
This commit is contained in:
levlam 2019-12-16 04:13:48 +03:00
parent ca519dcc81
commit 10c1b8c6ea

View File

@ -20,17 +20,14 @@
namespace td {
#define get_erase_logevent_promise(...) get_erase_logevent_promise_impl(__FILE__, __LINE__, __VA_ARGS__)
inline Promise<Unit> get_erase_logevent_promise_impl(const char *file, int line, uint64 logevent_id,
Promise<Unit> promise = Promise<Unit>()) {
inline Promise<Unit> get_erase_logevent_promise(uint64 logevent_id, Promise<Unit> promise = Promise<Unit>()) {
if (logevent_id == 0) {
return promise;
}
return PromiseCreator::lambda([file, line, logevent_id, promise = std::move(promise)](Result<Unit> result) mutable {
return PromiseCreator::lambda([logevent_id, promise = std::move(promise)](Result<Unit> result) mutable {
if (!G()->close_flag()) {
binlog_erase(G()->get_td_db_impl(file, line)->get_binlog_impl(file, line), logevent_id);
binlog_erase(G()->td_db()->get_binlog(), logevent_id);
}
promise.set_result(std::move(result));