Skip to content

Commit

Permalink
Merge pull request #591 from ibi-group/support-s3-link-preference
Browse files Browse the repository at this point in the history
support new `prefer_s3_links` config property
  • Loading branch information
miles-grant-ibigroup authored Mar 19, 2024
2 parents 53dc10a + 2150660 commit ff595d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions configurations/default/server.yml.tmp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ application:
modules:
enterprise:
enabled: false
# Setting this to true will upload all feeds to S3 instead of linking to their URL
prefer_s3_links: false
editor:
enabled: true
deployment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.text.SimpleDateFormat;

import static com.conveyal.datatools.manager.DataManager.getConfigPropertyAsText;
import static com.conveyal.datatools.manager.DataManager.hasConfigProperty;

/**
* Publish the latest GTFS files for all public feeds in a project.
Expand Down Expand Up @@ -67,7 +68,7 @@ public void jobLogic () {
.forEach(fs -> {
// generate list item for feed source
String url;
if (fs.url != null) {
if (fs.url != null && !hasConfigProperty("modules.enterprise.prefer_s3_links")) {
url = fs.url.toString();
}
else {
Expand Down

0 comments on commit ff595d2

Please sign in to comment.