WaitingTask in WaitingTask causes exception

This commit is contained in:
Peter Hormanns 2017-09-18 21:33:54 +02:00
parent 9e362b2f87
commit ced5cc9827

View File

@ -36,7 +36,12 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
Domain dom = (Domain) entity;
UnixUser domUser = dom.getUser();
Pac pac = domUser.getPac();
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(createHiveDNSSetupProcessor(em, dom));
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(
new CompoundProcessor(
createHiveDNSSetupProcessor(em, dom),
createHiveEMailSetupProcessor(em, dom)
)
);
Config config = Config.getInstance();
for (String queueName : config.getProperty("queues.dns").split(",")) {
mainProcessor.appendProcessor(queueName, createDNSServerConfigProcessor(em), queueName + ".hostsharing.net");
@ -44,7 +49,6 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
for (String queueName : config.getProperty("queues.mail").split(",")) {
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
}
mainProcessor.appendProcessor(hiveName, createHiveEMailSetupProcessor(em, dom), "Setup EMail");
mainProcessor.appendProcessor(hiveName, createDomainDirectoriesProcessor(dom), "Setup Domain Directories");
mainProcessor.appendProcessor(hiveName, createApacheVHostSetupProcessor(em, dom), "Setup Apache VHost");
mainProcessor.appendProcessor(hiveName, createACMEBotProcessor(em, dom), "Setup ACMEBot");