Skip to content

Commit

Permalink
Fix device heartbeat. Move harnesses outside of AuthorizeView.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Jun 15, 2023
1 parent b10cebc commit 2d73f74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Server/Hubs/AgentHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public Task Chat(string message, bool disconnected, string browserConnectionId)
}


public async Task CheckForPendingSriptRuns()
public async Task CheckForPendingScriptRuns()
{
var authToken = _expiringTokenService.GetToken(Time.Now.AddMinutes(AppConstants.ScriptRunExpirationMinutes));
var scriptRuns = await _dataService.GetPendingScriptRuns(Device.ID);
Expand Down Expand Up @@ -166,7 +166,7 @@ public async Task DeviceHeartbeat(Device device)

var result = await _dataService.AddOrUpdateDevice(device);

if (result.IsSuccess)
if (!result.IsSuccess)
{
return;
}
Expand All @@ -189,7 +189,7 @@ public async Task DeviceHeartbeat(Device device)
}


await CheckForPendingSriptRuns();
await CheckForPendingScriptRuns();
}


Expand Down
8 changes: 4 additions & 4 deletions Server/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
@Body
</div>
</div>

<ToastHarness />
<LoaderHarness />
<ModalHarness />
</div>
</Authorized>
<NotAuthorized>
Expand All @@ -37,3 +33,7 @@

</NotAuthorized>
</AuthorizeView>

<ToastHarness />
<LoaderHarness />
<ModalHarness />

0 comments on commit 2d73f74

Please sign in to comment.