File tree 2 files changed +10
-2
lines changed
ors-api/src/main/java/org/heigit/ors/api/servlet/listeners
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ RELEASING:
37
37
### Added
38
38
- documentation for A* config parameters ([ #1759 ] ( https://github.com/GIScience/openrouteservice/pull/1759 ) )
39
39
40
+ ### Fixed
41
+ - preparation mode exiting with code 0 on fail ([ #1772 ] ( https://github.com/GIScience/openrouteservice/pull/1772 ) )
42
+
40
43
## [ 8.0.0] - 2024-03-21
41
44
### Added
42
45
- snapping service endpoints for returning nearest points on the graph ([ #1519 ] ( https://github.com/GIScience/openrouteservice/issues/1519 ) )
Original file line number Diff line number Diff line change @@ -55,12 +55,17 @@ public void contextInitialized(ServletContextEvent contextEvent) {
55
55
try {
56
56
LOGGER .info ("Initializing ORS..." );
57
57
new RoutingProfileManager (config );
58
+ // TODO if feasible, move the preparation mode check to Application.java after the
59
+ // RoutingProfileManagerStatus.hasFailed() check.
58
60
if (engineProperties .isPreparationMode ()) {
61
+ if (RoutingProfileManagerStatus .hasFailed ()) {
62
+ System .exit (1 );
63
+ }
59
64
LOGGER .info ("Running in preparation mode, all enabled graphs are built, job is done." );
60
65
System .exit (0 );
61
66
}
62
67
} catch (Exception e ) {
63
- LOGGER .warn ("Unable to initialize ORS due to an unexpected exeception : " + e );
68
+ LOGGER .warn ("Unable to initialize ORS due to an unexpected exception : " + e );
64
69
}
65
70
};
66
71
Thread thread = new Thread (runnable );
@@ -81,4 +86,4 @@ public void contextDestroyed(ServletContextEvent contextEvent) {
81
86
LOGGER .error (e .getMessage ());
82
87
}
83
88
}
84
- }
89
+ }
You can’t perform that action at this time.
0 commit comments