Skip to content

Commit

Permalink
Remove otp1 routes (#621)
Browse files Browse the repository at this point in the history
* Remove OTP1 routes

* Rename OTP2 NeTEx export file to rb_norway-aggregated-netex.zip

* Code clean-up

* Fix unit test

* Move OTP1 PubSub queues to OTP2
  • Loading branch information
vpaturet authored Oct 21, 2024
1 parent f77eb2a commit 51d5123
Show file tree
Hide file tree
Showing 19 changed files with 28 additions and 972 deletions.
4 changes: 0 additions & 4 deletions src/main/java/no/rutebanken/marduk/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ public final class Constants {
public static final String CURRENT_FLEXIBLE_LINES_NETEX_FILENAME = "flexible-lines.zip";

public static final String GRAPH_COMPATIBILITY_VERSION = "RutebankenGraphCompatibilityVersion";
public static final String GRAPH_OBJ = "Graph.obj";
public static final String BASE_GRAPH_OBJ = "baseGraph.obj";
public static final String NETEX_GRAPH_DIR = "netex";
public static final String GRAPH_REPORT_INDEX_FILE = "index_otp1.html";

public static final String OTP2_GRAPH_OBJ = "Graph-otp2.obj";
public static final String OTP2_GRAPH_OBJ_PREFIX = "Graph-otp2";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,15 +623,15 @@ public void configure() throws Exception {
.log(LoggingLevel.INFO, "Triggered build of OTP base graph with map data")
.process(this::removeAllCamelHttpHeaders)
.setBody(simple(""))
.to(ExchangePattern.InOnly, "google-pubsub:{{marduk.pubsub.project.id}}:OtpBaseGraphBuildQueue")
.to(ExchangePattern.InOnly, "google-pubsub:{{marduk.pubsub.project.id}}:Otp2BaseGraphBuildQueue")
.routeId("admin-build-base-graph");

from("direct:adminBuildGraphNetex")
.to("direct:authorizeAdminRequest")
.log(LoggingLevel.INFO, "OTP build graph from NeTEx")
.process(this::removeAllCamelHttpHeaders)
.setBody(simple(""))
.to(ExchangePattern.InOnly, "google-pubsub:{{marduk.pubsub.project.id}}:OtpGraphBuildQueue")
.to(ExchangePattern.InOnly, "google-pubsub:{{marduk.pubsub.project.id}}:Otp2GraphBuildQueue")
.routeId("admin-build-graph-netex");

from("direct:adminBuildGraphCandidate")
Expand Down Expand Up @@ -689,7 +689,7 @@ public void configure() throws Exception {
.to("direct:authorizeBlocksDownloadRequest")
.process(e -> e.getIn().setHeader(FILE_HANDLE, Constants.BLOBSTORE_PATH_NETEX_BLOCKS_EXPORT
+ "rb_" + e.getIn().getHeader(CHOUETTE_REFERENTIAL, String.class).toLowerCase()
+ "-aggregated-netex.zip"))
+ "-" + Constants.CURRENT_AGGREGATED_NETEX_FILENAME))
.log(LoggingLevel.INFO, correlation() + "Downloading NeTEx dataset with blocks: ${header." + FILE_HANDLE + "}")
.process(this::removeAllCamelHttpHeaders)
.to("direct:getInternalBlob")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void configure() throws Exception {
.setHeader(FINISHED, simple("true", Boolean.class))
.log(LoggingLevel.INFO, correlation() + "Map was updated, therefore triggering OSM base graph build")
.setBody(constant(""))
.to(ExchangePattern.InOnly, "google-pubsub:{{marduk.pubsub.project.id}}:OtpBaseGraphBuildQueue")
.to(ExchangePattern.InOnly, "google-pubsub:{{marduk.pubsub.project.id}}:Otp2BaseGraphBuildQueue")
.log(LoggingLevel.DEBUG, correlation() + "Processing of OSM map finished")
.routeId("osm-fetch-map");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void configure() throws Exception {
.process(e -> JobEvent.providerJobBuilder(e).timetableAction(JobEvent.TimetableAction.BUILD_GRAPH).state(JobEvent.State.PENDING).build())
.to("direct:updateStatus")
.log(LoggingLevel.INFO, getClass().getName(), correlation() + "FlexibleLines merging OK, triggering OTP graph build.")
.to("google-pubsub:{{marduk.pubsub.project.id}}:OtpGraphBuildQueue")
.to("google-pubsub:{{marduk.pubsub.project.id}}:Otp2GraphBuildQueue")
.to("direct:startDamuGtfsExport")
.routeId("publish-merged-dataset");

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 51d5123

Please sign in to comment.