mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-27 04:19:04 +08:00
Make each JobsQueue tasks execute in its own transaction, see #5365
This commit is contained in:
@@ -87,7 +87,7 @@ namespace Orchard.JobsQueue.Controllers {
|
|||||||
if (_jobsQueueManager.GetJobsCount() > 0) {
|
if (_jobsQueueManager.GetJobsCount() > 0) {
|
||||||
_services.Notifier.Information(T("Processing is in progress."));
|
_services.Notifier.Information(T("Processing is in progress."));
|
||||||
processQueue = true;
|
processQueue = true;
|
||||||
_jobsQueueProcessor.ProcessQueue(10, 1);
|
_jobsQueueProcessor.ProcessQueue(1, 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_services.Notifier.Information(T("Processing has been completed."));
|
_services.Notifier.Information(T("Processing has been completed."));
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ namespace Orchard.JobsQueue.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void Sweep() {
|
public void Sweep() {
|
||||||
_jobsQueueProcessor.ProcessQueue(10, uint.MaxValue);
|
_jobsQueueProcessor.ProcessQueue(1, uint.MaxValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user