| 431 | } |
| 432 | |
| 433 | bool BackgroundJob::sync(const ServerInfo & server_info) |
| 434 | { |
| 435 | CnchBGThreadStatus store_status = daemon_job.getStatusPersistentStore().getStatus(storage_id.uuid, true); |
| 436 | setExpectedStatus(store_status); |
| 437 | |
| 438 | std::optional<BackgroundJob::SyncAction> action = getSyncAction(server_info); |
| 439 | if (!action) |
| 440 | return false; |
| 441 | return executeSyncAction(action.value()); |
| 442 | } |
| 443 | |
| 444 | void BackgroundJob::setExpectedStatus(CnchBGThreadStatus status_) |
| 445 | { |