Flushing tasks deletion (#7547)

This commit is contained in:
siyamandayubi 2017-02-02 21:27:31 +01:00 committed by Sébastien Ros
parent 8b343f3cfc
commit 50512839fb

View File

@ -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)
};