From 6ede8d9c162c7378d3264981370cc5a8846c9a1f Mon Sep 17 00:00:00 2001 From: ereali-aneo Date: Wed, 17 Jul 2024 10:28:15 +0200 Subject: [PATCH] docs: reformulate or add few comments --- src/TaskReRunner/Program.cs | 11 +++++++---- src/TaskReRunner/Storage/DumpFormat.cs | 6 +++--- src/TaskReRunner/Storage/ProcessData.cs | 7 +------ 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/TaskReRunner/Program.cs b/src/TaskReRunner/Program.cs index c4e08e0..08a4121 100644 --- a/src/TaskReRunner/Program.cs +++ b/src/TaskReRunner/Program.cs @@ -39,6 +39,8 @@ internal static class Program /// /// Connect to a Worker to process tasks with specific process parameter. /// + /// Path to the json file containing the data needed to rerun the Task. + /// Absolute path to the folder created to contain the binary data required to rerun the Task. /// public static void Run(string path, string dataFolder) @@ -104,6 +106,7 @@ public static void Run(string path, using var server = new Server("/tmp/agent.sock", storage, loggerConfiguration_); + // Create a class with all values use to process a task var toProcess = new ProcessData { CommunicationToken = token, @@ -177,12 +180,12 @@ public static void Run(string path, public static async Task Main(string[] args) { + // Define the options for the application with their description and default value var path = new Option("--path", - description: "Path to the file containing the data needed to rerun the Task in json.", - getDefaultValue: () => "toProcess.json"); + description: "Path to the json file containing the data needed to rerun the Task.", + getDefaultValue: () => "Data.json"); var dataFolder = new Option("--dataFolder", - description: - "Absolute path to the folder containing the data needed to rerun the Task in binary or create one if the binary are in the json.", + description: "Absolute path to the folder created to contain the binary data required to rerun the Task.", getDefaultValue: () => Directory.CreateTempSubdirectory() .FullName); diff --git a/src/TaskReRunner/Storage/DumpFormat.cs b/src/TaskReRunner/Storage/DumpFormat.cs index 462be1c..b252437 100644 --- a/src/TaskReRunner/Storage/DumpFormat.cs +++ b/src/TaskReRunner/Storage/DumpFormat.cs @@ -22,9 +22,9 @@ namespace ArmoniK.TaskReRunner.Storage; /// -/// Represents all the parameters needed to launch a process. -/// Properties: CommunicationToken, PayloadId, SessionId, Configuration, DataFolder, TaskId, TaskOptions, -/// DataDependencies, ExpectedOutputKeys. +/// Represents all the parameters extracted from ArmoniK required to rerun a task. +/// Properties: PayloadId, SessionId, Configuration, TaskId, TaskOptions, +/// DataDependencies, ExpectedOutputKeys, RawData. /// public record DumpFormat { diff --git a/src/TaskReRunner/Storage/ProcessData.cs b/src/TaskReRunner/Storage/ProcessData.cs index b7f49f4..e45a5ba 100644 --- a/src/TaskReRunner/Storage/ProcessData.cs +++ b/src/TaskReRunner/Storage/ProcessData.cs @@ -71,10 +71,5 @@ public record ProcessData /// /// Gets or sets the folder location for storing data. /// - public required string? DataFolder { get; init; } - - /// - /// Get or init a dictionary containing the payload, data dependencies, and expected outputs corresponding byte array. - /// - public ConcurrentDictionary RawData { get; init; } = new(); + public required string DataFolder { get; init; } }