mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-24 10:11:35 +08:00
Flushing tasks deletion (#7547)
This commit is contained in:
committed by
Sébastien Ros
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)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user