| 2911 | } |
| 2912 | |
| 2913 | ACTOR static Future<Key> addTask(Reference<ReadYourWritesTransaction> tr, |
| 2914 | Reference<TaskBucket> taskBucket, |
| 2915 | Reference<Task> parentTask, |
| 2916 | TaskCompletionKey completionKey, |
| 2917 | Reference<TaskFuture> waitFor = Reference<TaskFuture>()) { |
| 2918 | Key doneKey = wait(completionKey.get(tr, taskBucket)); |
| 2919 | state Reference<Task> task(new Task(RestoreCompleteTaskFunc::name, RestoreCompleteTaskFunc::version, doneKey)); |
| 2920 | |
| 2921 | // Get restore config from parent task and bind it to new task |
| 2922 | wait(RestoreConfig(parentTask).toTask(tr, task)); |
| 2923 | |
| 2924 | if (!waitFor) { |
| 2925 | return taskBucket->addTask(tr, task); |
| 2926 | } |
| 2927 | |
| 2928 | wait(waitFor->onSetAddTask(tr, taskBucket, task)); |
| 2929 | return LiteralStringRef("OnSetAddTask"); |
| 2930 | } |
| 2931 | |
| 2932 | static StringRef name; |
| 2933 | static constexpr uint32_t version = 1; |
nothing calls this directly
no test coverage detected