Skip to content

Commit 18e14e8

Browse files
authored
Merge pull request #200 from HSLdevcom/fix-bikeupdater-npe
Wait until graph has vertices
2 parents a086893 + 5a2874d commit 18e14e8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/opentripplanner/updater/bike_rental/BikeRentalUpdater.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ protected void configurePolling (Graph graph, JsonNode config) throws Exception
133133

134134
@Override
135135
public void setup() throws InterruptedException, ExecutionException {
136+
while (graph.getVertices() == null) {
137+
LOG.warn("Graph has no vertices. Sleeping 5 sec");
138+
Thread.sleep(5000);
139+
}
136140
// Creation of network linker library will not modify the graph
137141
linker = new SimpleStreetSplitter(graph);
138142

0 commit comments

Comments
 (0)