MCPcopy Create free account
hub / github.com/apple/foundationdb / addTask

Method addTask

fdbclient/FileBackupAgent.actor.cpp:2913–2930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers

nothing calls this directly

Calls 5

RestoreConfigClass · 0.85
toTaskMethod · 0.80
getMethod · 0.65
addTaskMethod · 0.45
onSetAddTaskMethod · 0.45

Tested by

no test coverage detected