Skip to content
Snippets Groups Projects
Commit c191c88d authored by anttil's avatar anttil
Browse files

SSDM-1330: DynamicPropertyEvaluationMaintenanceTask should not clear the command queue

SVN: 33159
parent b40d15c1
No related branches found
No related tags found
No related merge requests found
......@@ -121,8 +121,15 @@ public final class DynamicPropertyEvaluationScheduler implements
if (threadOperations.size() > 0)
{
threadDebugLog("Synchronizing scheduled operations");
for (DynamicPropertyEvaluationOperation operation : threadOperations)
outer: for (DynamicPropertyEvaluationOperation operation : threadOperations)
{
if (operation.getIds() == null) {
for (DynamicPropertyEvaluationOperation op : evaluatorQueue) {
if (op.getIds() == null && op.getClassName().equals(operation.getClassName())) {
continue outer;
}
}
}
evaluatorQueue.add(operation);
}
threadOperations.clear();
......@@ -152,7 +159,17 @@ public final class DynamicPropertyEvaluationScheduler implements
@Override
public DynamicPropertyEvaluationOperation peekWait() throws InterruptedException
{
return evaluatorQueue.peekWait();
DynamicPropertyEvaluationOperation op = evaluatorQueue.peekWait();
if (op.getIds() == null) {
for (DynamicPropertyEvaluationOperation operation : evaluatorQueue) {
if (operation.getIds() != null) {
evaluatorQueue.add(evaluatorQueue.take());
return peekWait();
}
}
}
return op;
}
@Override
......
......@@ -64,8 +64,6 @@ public class DynamicPropertyEvaluationMaintenanceTask implements IMaintenanceTas
CommonServiceProvider.getDAOFactory().getPersistencyResources()
.getDynamicPropertyEvaluationScheduler();
// all entities will be scheduled for update so previous schedule can be cleared
scheduler.clear();
for (Class<? extends IEntityInformationWithPropertiesHolder> entityClass : entityClasses)
{
DynamicPropertyEvaluationOperation operation =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment