mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Flushing tasks deletion (#7547)
This commit is contained in:
parent
8b343f3cfc
commit
50512839fb
@ -54,6 +54,9 @@ namespace Orchard.Core.Scheduling.Services {
|
||||
// removing record first helps avoid concurrent execution
|
||||
_repository.Delete(taskRecord);
|
||||
|
||||
// persisting the change so it takes effect in the other async operations
|
||||
_repository.Flush();
|
||||
|
||||
var context = new ScheduledTaskContext {
|
||||
Task = new Task(_contentManager, taskRecord)
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user