You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicasyncTaskStartProcessingAsync(CancellationTokencancellationToken){try{// this throws an exceptionthis.GetReminder(ReminderName);// therefore this never gets calledbooladded=awaitthis.StateManager.TryAddStateAsync<long>(StateName,0);if(!added){// value already exists, which means processing has already started.thrownewInvalidOperationException("Processing for this actor has already started.");}}catch(ReminderNotFoundException){awaitthis.RegisterReminderAsync(ReminderName,null,TimeSpan.FromMinutes(1),TimeSpan.FromMinutes(10));}}publicasyncTaskReceiveReminderAsync(stringreminderName,byte[]context,TimeSpandueTime,TimeSpanperiod){if(reminderName.Equals(ReminderName,StringComparison.OrdinalIgnoreCase)){// since TrySetState never gets called -- this will cause an exceptionlongcurrentValue=awaitthis.StateManager.GetStateAsync<long>(StateName);ActorEventSource.Current.ActorMessage(this,$"Processing. Current value: {currentValue}");awaitthis.StateManager.SetStateAsync<long>(StateName,++currentValue);}}
The ActorBackendService controller will use the proxy to call this method. GetReminder will throw an exception which will go to the catch block and call RegisterReminderAsync.
Once the reminder is received it tries to use GetState but the state was never initialized because GetReminder threw an exception and skipped the rest of the code.
The text was updated successfully, but these errors were encountered:
This is the code for the Actor service:
The ActorBackendService controller will use the proxy to call this method. GetReminder will throw an exception which will go to the catch block and call RegisterReminderAsync.
Once the reminder is received it tries to use GetState but the state was never initialized because GetReminder threw an exception and skipped the rest of the code.
The text was updated successfully, but these errors were encountered: