Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
feat: create abstract job manager and local job manager
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-houille committed Dec 15, 2023
1 parent 98aea3e commit 466db55
Show file tree
Hide file tree
Showing 14 changed files with 408 additions and 371 deletions.
2 changes: 1 addition & 1 deletion EasyCLI/Commands/CheckCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public override bool ValidateArgs(IEnumerable<string> args)
public override void Run(IEnumerable<string> args)
{
var argsList = args.ToList();
var jm = new JobManager();
var jm = new LocalJobManager();
var fetchJobsResult = jm.FetchJobs();

if (!fetchJobsResult)
Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/CreateCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public override void Run(IEnumerable<string> args)
jobType = (JobType)Params.Flags[0].Type.ParseValue();
}

var jm = new JobManager();
var jm = new LocalJobManager();

var jobCheck = jm.CheckJobRules(-1, name, source, destination);
if (jobCheck != JobCheckRule.Valid)
Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/DeleteCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override void Run(IEnumerable<string> args)
return;
}

var jobManager = new JobManager();
var jobManager = new LocalJobManager();

if (jobManager.GetJobs().Count == 0)
{
Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/DiscardCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override void Run(IEnumerable<string> args)
Console.WriteLine("Invalid arguments. Type 'easysave help discard' for more information");
}

var jm = new JobManager();
var jm = new LocalJobManager();
var fetchSuccess = jm.FetchJobs();

if (!fetchSuccess)
Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/EditCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public override void Run(IEnumerable<string> args)
jobType = (JobType)Params.Flags[0].Type.ParseValue();
}

var jm = new JobManager();
var jm = new LocalJobManager();

var job = jm.GetJobsFromIds(new[] { id });

Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/ListCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override bool ValidateArgs(IEnumerable<string> args)
public override void Run(IEnumerable<string> args)
{
var argsList = args.ToList();
var jm = new JobManager();
var jm = new LocalJobManager();
var fetchSuccess = jm.FetchJobs();

if (!fetchSuccess)
Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/ResumeCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override void Run(IEnumerable<string> args)
return;
}

var jm = new JobManager();
var jm = new LocalJobManager();
var fetchSuccess = jm.FetchJobs();

if (!fetchSuccess)
Expand Down
2 changes: 1 addition & 1 deletion EasyCLI/Commands/RunCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override void Run(IEnumerable<string> args)
return;
}

var jm = new JobManager();
var jm = new LocalJobManager();
var fetchSuccess = jm.FetchJobs();

if (!fetchSuccess)
Expand Down
2 changes: 1 addition & 1 deletion EasyGUI/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public MainWindow()
{
InitializeComponent();

_jobManager = new JobManager();
_jobManager = new LocalJobManager();
foreach (var job in _jobManager.GetJobs())
{
Jobs.Add(job);
Expand Down
2 changes: 2 additions & 0 deletions EasyLib/Files/References/ConfigManagerReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ public ConfigManagerReference(string appDataPath)
public string? EasyCryptoPath { get; set; }
public string? CompanySoftwareProcessPath { get; set; }
public ulong MaxFileSize { get; set; } = 1000000;
public int ServerPort { get; set; } = 4242;
public string ServerIp { get; set; } = "";

private static string GenerateRandomKey()
{
Expand Down
Loading

0 comments on commit 466db55

Please sign in to comment.