Skip to content

Commit

Permalink
docs: reformulate or add few comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ereali-aneo committed Jul 17, 2024
1 parent 8a2ca9f commit 6ede8d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
11 changes: 7 additions & 4 deletions src/TaskReRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ internal static class Program
/// <summary>
/// Connect to a Worker to process tasks with specific process parameter.
/// </summary>
/// <param name="path">Path to the json file containing the data needed to rerun the Task.</param>
/// <param name="dataFolder">Absolute path to the folder created to contain the binary data required to rerun the Task.</param>
/// <exception cref="ArgumentException"></exception>
public static void Run(string path,
string dataFolder)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -177,12 +180,12 @@ public static void Run(string path,

public static async Task<int> Main(string[] args)
{
// Define the options for the application with their description and default value
var path = new Option<string>("--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<string>("--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);

Expand Down
6 changes: 3 additions & 3 deletions src/TaskReRunner/Storage/DumpFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
namespace ArmoniK.TaskReRunner.Storage;

/// <summary>
/// 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.
/// </summary>
public record DumpFormat
{
Expand Down
7 changes: 1 addition & 6 deletions src/TaskReRunner/Storage/ProcessData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,5 @@ public record ProcessData
/// <summary>
/// Gets or sets the folder location for storing data.
/// </summary>
public required string? DataFolder { get; init; }

/// <summary>
/// Get or init a dictionary containing the payload, data dependencies, and expected outputs corresponding byte array.
/// </summary>
public ConcurrentDictionary<string, byte[]?> RawData { get; init; } = new();
public required string DataFolder { get; init; }
}

0 comments on commit 6ede8d9

Please sign in to comment.