Skip to content

Commit

Permalink
fix(DeployJob): trigger pelias update even if server is already deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Sep 29, 2021
1 parent a8cf6bf commit 429f419
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/main/java/com/conveyal/datatools/manager/jobs/DeployJob.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"))) {
Expand All @@ -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;
}
Expand Down

0 comments on commit 429f419

Please sign in to comment.