Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed wait state reporting #12

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dkgServiceNode/Controllers/NodesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,13 @@
}

runner.SetStepTwoWaitingTime(round);
await UpdateNodeState(node, (short)stReport.Status, round?.Id);

if (stReport.Data.Length != 0)
{
runner.SetStepTwoData(round, node, stReport.Data);

Check warning on line 179 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepTwoData(Round round, Node node, string[] data)'.

Check warning on line 179 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepTwoData(Round round, Node node, string[] data)'.

Check warning on line 179 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepTwoData(Round round, Node node, string[] data)'.

Check warning on line 179 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepTwoData(Round round, Node node, string[] data)'.

Check warning on line 179 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepTwoData(Round round, Node node, string[] data)'.

Check warning on line 179 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepTwoData(Round round, Node node, string[] data)'.
}
if (runner.IsStepTwoDataReady(round))

Check warning on line 181 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepTwoDataReady(Round round)'.

Check warning on line 181 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepTwoDataReady(Round round)'.

Check warning on line 181 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepTwoDataReady(Round round)'.

Check warning on line 181 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepTwoDataReady(Round round)'.

Check warning on line 181 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepTwoDataReady(Round round)'.

Check warning on line 181 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepTwoDataReady(Round round)'.
{
await UpdateRoundState(round);
return Ok(new StatusResponse(round.Id, NStatus.RunningStepTwo, runner.GetStepTwoData(round, node)));
Expand All @@ -192,12 +193,13 @@
}

runner.SetStepThreeWaitingTime(round);
await UpdateNodeState(node, (short)stReport.Status, round?.Id);

if (stReport.Data.Length != 0)
{
runner.SetStepThreeData(round, node, stReport.Data);

Check warning on line 200 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepThreeData(Round round, Node node, string[] data)'.

Check warning on line 200 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepThreeData(Round round, Node node, string[] data)'.

Check warning on line 200 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepThreeData(Round round, Node node, string[] data)'.

Check warning on line 200 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepThreeData(Round round, Node node, string[] data)'.

Check warning on line 200 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepThreeData(Round round, Node node, string[] data)'.

Check warning on line 200 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'void Runner.SetStepThreeData(Round round, Node node, string[] data)'.
}
if (runner.IsStepThreeDataReady(round))

Check warning on line 202 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepThreeDataReady(Round round)'.

Check warning on line 202 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on ubuntu-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepThreeDataReady(Round round)'.

Check warning on line 202 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepThreeDataReady(Round round)'.

Check warning on line 202 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on windows-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepThreeDataReady(Round round)'.

Check warning on line 202 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepThreeDataReady(Round round)'.

Check warning on line 202 in dkgServiceNode/Controllers/NodesController.cs

View workflow job for this annotation

GitHub Actions / Test on macos-latest

Possible null reference argument for parameter 'round' in 'bool Runner.IsStepThreeDataReady(Round round)'.
{
await UpdateRoundState(round);
return Ok(new StatusResponse(round.Id, NStatus.RunningStepThree, runner.GetStepThreeData(round, node)));
Expand Down
1 change: 1 addition & 0 deletions dkgServiceNode/Data/DbEnsure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ public static void Ensure(string connectionString)
PuVersionUpdate("0.4.2", connection);
EnsureVersion("0.4.3", sqlScript_0_4_3, connection);
EnsureVersion("0.5.0", sqlScript_0_5_0, connection);
PuVersionUpdate("0.5.1", connection);
}
}
}
Expand Down