diff --git a/src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java b/src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java index ddcb2c09b..acc4c4ccf 100644 --- a/src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java +++ b/src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java @@ -319,6 +319,16 @@ public void jobLogic () { } } + // Now that the build was successful, update Pelias + if (deployment.peliasUpdate) { + // Get log upload URI from deploy job + AmazonS3URI logUploadS3URI = getS3FolderURI(); + + // Execute the pelias update job and keep track of it + PeliasUpdateJob peliasUpdateJob = new PeliasUpdateJob(owner, "Updating Custom Geocoder Database", deployment, logUploadS3URI); + addNextJob(peliasUpdateJob); + } + // Handle spinning up new EC2 servers for the load balancer's target group. if (otpServer.ec2Info != null) { if ("true".equals(DataManager.getConfigPropertyAsText("modules.deployment.ec2.enabled"))) { @@ -341,15 +351,6 @@ public void jobLogic () { status.baseUrl = otpServer.publicUrl; } - // Now that the main instance is updated successfully, update Pelias - if (deployment.peliasUpdate) { - // Get log upload URI from deploy job - AmazonS3URI logUploadS3URI = getS3FolderURI(); - - // Execute the pelias update job and keep track of it - PeliasUpdateJob peliasUpdateJob = new PeliasUpdateJob(owner, "Updating Custom Geocoder Database", deployment, logUploadS3URI); - this.addNextJob(peliasUpdateJob); - } status.completed = true; }