sequence problem when creating domains fixed
This commit is contained in:
parent
e8c256da9c
commit
ca9215d5a1
@ -35,7 +35,11 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
UnixUser domUser = dom.getUser();
|
UnixUser domUser = dom.getUser();
|
||||||
Pac pac = domUser.getPac();
|
Pac pac = domUser.getPac();
|
||||||
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(
|
WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor(
|
||||||
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"))
|
new CompoundProcessor(
|
||||||
|
new ShellProcessor("salt-call state.sls pacs"),
|
||||||
|
createDomainDirectoriesProcessor(dom),
|
||||||
|
createApacheVHostSetupProcessor(em, dom)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
Config config = Config.getInstance();
|
Config config = Config.getInstance();
|
||||||
for (String queueName : config.getProperty("queues.dns").split(",")) {
|
for (String queueName : config.getProperty("queues.dns").split(",")) {
|
||||||
@ -44,24 +48,23 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
|
mainProcessor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
mainProcessor.appendProcessor(hiveName, createDomainDirectoriesProcessor(dom), "Setup Domain Directories");
|
|
||||||
mainProcessor.appendProcessor(hiveName, createApacheVHostSetupProcessor(em, dom), "Setup Apache VHost");
|
|
||||||
mainProcessor.appendProcessor(hiveName, createTriggerAcmebotProcessor(em, dom), "Trigger ACMEBot");
|
mainProcessor.appendProcessor(hiveName, createTriggerAcmebotProcessor(em, dom), "Trigger ACMEBot");
|
||||||
return mainProcessor;
|
return mainProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends AbstractEntity> Processor createUpdateProcessor(final EntityManager em, final T entity) throws ProcessorException {
|
public <T extends AbstractEntity> Processor createUpdateProcessor(final EntityManager em, final T entity) throws ProcessorException {
|
||||||
|
String hiveName = entity.getHiveName();
|
||||||
final Domain dom = (Domain) entity;
|
final Domain dom = (Domain) entity;
|
||||||
final UnixUser domUser = dom.getUser();
|
final UnixUser domUser = dom.getUser();
|
||||||
final Pac pac = domUser.getPac();
|
final Pac pac = domUser.getPac();
|
||||||
final Processor apacheVHostSetupProcessor = createApacheVHostSetupProcessor(em, dom);
|
final Processor apacheVHostSetupProcessor = createApacheVHostSetupProcessor(em, dom);
|
||||||
final Processor triggerAcmebotProcessor = createTriggerAcmebotProcessor(em, dom);
|
|
||||||
final WaitingTasksProcessor processor = new WaitingTasksProcessor(
|
final WaitingTasksProcessor processor = new WaitingTasksProcessor(
|
||||||
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"), apacheVHostSetupProcessor, triggerAcmebotProcessor));
|
new CompoundProcessor(new ShellProcessor("salt-call state.sls pacs"), apacheVHostSetupProcessor));
|
||||||
final Config config = Config.getInstance();
|
final Config config = Config.getInstance();
|
||||||
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
for (String queueName : config.getProperty("queues.mail").split(",")) {
|
||||||
processor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
|
processor.appendProcessor(queueName, createMailinSetupProcessor(em, dom, pac), queueName + ".hostsharing.net");
|
||||||
}
|
}
|
||||||
|
processor.appendProcessor(hiveName, createTriggerAcmebotProcessor(em, dom), "Trigger ACMEBot");
|
||||||
return processor;
|
return processor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user