Skip to content

Commit

Permalink
Fixed autocad async (#370)
Browse files Browse the repository at this point in the history
Co-authored-by: Alan Rynne <[email protected]>
  • Loading branch information
JR-Morgan and AlanRynne authored Nov 7, 2024
1 parent bc6f6c4 commit c1293ff
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,13 @@ private void OnObjectChanged(DBObject dbObject)
private void OnChangeChangedObjectIds(DBObject dBObject)
{
ChangedObjectIds[dBObject.GetSpeckleApplicationId()] = 1;
_idleManager.SubscribeToIdle(nameof(AutocadSendBinding), RunExpirationChecks);
_idleManager.SubscribeToIdle(
nameof(AutocadSendBinding),
async () => await RunExpirationChecks().ConfigureAwait(false)
);
}

private void RunExpirationChecks()
private async Task RunExpirationChecks()
{
var senders = _store.GetSenders();
string[] objectIdsList = ChangedObjectIds.Keys.ToArray();
Expand All @@ -132,7 +135,7 @@ private void RunExpirationChecks()
}
}

Commands.SetModelsExpired(expiredSenderIds);
await Commands.SetModelsExpired(expiredSenderIds).ConfigureAwait(false);
ChangedObjectIds = new();
}

Expand Down

0 comments on commit c1293ff

Please sign in to comment.