Skip to content

Commit ea218d9

Browse files
authored
Merge pull request #608 from ibi-group/feature/DT-491-auto-pub-gtfs-error
Notify subscribers of auto publish failure
2 parents 1f13778 + 5f1ea1b commit ea218d9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/maven.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
mongodb-version: 4.2
4040
- name: Setup Maven Cache
41-
uses: actions/cache@v2
41+
uses: actions/cache@v4
4242
id: cache
4343
with:
4444
path: ~/.m2

src/main/java/com/conveyal/datatools/manager/jobs/AutoPublishJob.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,19 @@ protected void innerJobLogic() throws Exception {
5454
}
5555
}
5656

57-
// If validation successful, just execute the feed updating process.
5857
if (!status.error) {
58+
// Validation successful, just execute the feed updating process.
5959
FeedVersionController.publishToExternalResource(latestFeedVersion);
6060
LOG.info("Auto-published feed source {} to external resource.", feedSource.id);
61+
} else {
62+
// Notify feed and project subscribed users of failure.
63+
String message = String.format(
64+
"WARNING: Auto-published feed source %s failed to deploy. Error: %s.",
65+
feedSource.name,
66+
status.message
67+
);
68+
NotifyUsersForSubscriptionJob.createNotification("feed-updated", feedSource.id, message);
69+
NotifyUsersForSubscriptionJob.createNotification("project-updated", feedSource.projectId, message);
6170
}
6271
}
6372
}

0 commit comments

Comments
 (0)