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
The job just pings the aggregate. And the whole process repeats.
classPingJob:IJob{publicrequiredTestIdTestId{get;init;}publicasyncTaskExecuteAsync(IServiceProviderserviceProvider,CancellationTokencancellationToken){Console.WriteLine("Job started at: {0}",DateTimeOffset.Now);awaitserviceProvider.GetRequiredService<IAggregateStore>().UpdateAsync<Test,TestId>(TestId,TestId.New,(a,_)=>a.Ping(),cancellationToken);}}
Hi,
I think I found two potential issues in the jobs functionality. But maybe I don’t understand something. Please let me know if I’m wrong.
Code snippets
There is a test aggregate.
There is also a subscriber to
Pinged
event. The subscriber schedules a job with 5 sec delay.The job just pings the aggregate. And the whole process repeats.
Full example is here.
1st issue
From the code above, I expect that the job will be started after 5 sec delay. But in my case, it starts only after 15 sec.
2nd issue
Everything works fine, if I register events, subscribers and jobs like this
But if I replace the code above with the following code:
The output becomes like this:
Seems like this causes registration of the async subscriber twice.
The text was updated successfully, but these errors were encountered: