Remove get_erase_logevent_promise debug.
GitOrigin-RevId: 06ed913e54f6d257243717568a706e3d1124a9b2
This commit is contained in:
parent
ca519dcc81
commit
10c1b8c6ea
@ -20,17 +20,14 @@
|
|||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
#define get_erase_logevent_promise(...) get_erase_logevent_promise_impl(__FILE__, __LINE__, __VA_ARGS__)
|
inline Promise<Unit> get_erase_logevent_promise(uint64 logevent_id, Promise<Unit> promise = Promise<Unit>()) {
|
||||||
|
|
||||||
inline Promise<Unit> get_erase_logevent_promise_impl(const char *file, int line, uint64 logevent_id,
|
|
||||||
Promise<Unit> promise = Promise<Unit>()) {
|
|
||||||
if (logevent_id == 0) {
|
if (logevent_id == 0) {
|
||||||
return promise;
|
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()) {
|
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));
|
promise.set_result(std::move(result));
|
||||||
|
Reference in New Issue
Block a user