Remove now unneded dummy parameters.

GitOrigin-RevId: 4ffd517ab80431c0d52b2c0a1b01b0216383aefd
This commit is contained in:
levlam 2020-03-02 02:15:12 +03:00
parent dc89a85449
commit 751dae9e64
2 changed files with 7 additions and 7 deletions

View File

@ -122,7 +122,7 @@ void StorageManager::run_gc(FileGcParameters parameters, Promise<FileStats> prom
PromiseCreator::lambda(
[actor_id = actor_id(this), parameters = std::move(parameters)](Result<FileStats> file_stats) {
send_closure(actor_id, &StorageManager::on_all_files, std::move(parameters),
std::move(file_stats), false);
std::move(file_stats));
}));
//NB: get_storage_stats will cancel all gc queries, so promise needs to be added after the call
@ -153,20 +153,20 @@ void StorageManager::create_stats_worker() {
}
}
void StorageManager::on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats, bool dummy) {
void StorageManager::on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats) {
int32 dialog_limit = gc_parameters.dialog_limit;
if (is_closed_ && r_file_stats.is_ok()) {
r_file_stats = Status::Error(500, "Request aborted");
}
if (r_file_stats.is_error()) {
return on_gc_finished(dialog_limit, std::move(r_file_stats), false);
return on_gc_finished(dialog_limit, std::move(r_file_stats));
}
create_gc_worker();
send_closure(gc_worker_, &FileGcWorker::run_gc, std::move(gc_parameters), r_file_stats.move_as_ok().all_files,
PromiseCreator::lambda([actor_id = actor_id(this), dialog_limit](Result<FileStats> r_file_stats) {
send_closure(actor_id, &StorageManager::on_gc_finished, dialog_limit, std::move(r_file_stats), false);
send_closure(actor_id, &StorageManager::on_gc_finished, dialog_limit, std::move(r_file_stats));
}));
}
@ -212,7 +212,7 @@ void StorageManager::create_gc_worker() {
}
}
void StorageManager::on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats, bool dummy) {
void StorageManager::on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats) {
if (r_file_stats.is_error()) {
if (r_file_stats.error().code() != 500) {
LOG(ERROR) << "GC failed: " << r_file_stats.error();

View File

@ -87,9 +87,9 @@ class StorageManager : public Actor {
uint32 last_gc_timestamp_ = 0;
double next_gc_at_ = 0;
void on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats, bool dummy);
void on_all_files(FileGcParameters gc_parameters, Result<FileStats> r_file_stats);
void create_gc_worker();
void on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats, bool dummy);
void on_gc_finished(int32 dialog_limit, Result<FileStats> r_file_stats);
void close_stats_worker();
void close_gc_worker();