Skip to content

Commit 77cbf9c

Browse files
wip
1 parent ad72069 commit 77cbf9c

3 files changed

Lines changed: 0 additions & 12 deletions

File tree

exe/batch.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,6 @@ int batch(int ac, char** av) {
172172
if (rt) {
173173
apply_canned_rt_update(c, d);
174174
}
175-
// Rental routing needs GBFS data; without this, RENTAL modes silently
176-
// produce no offsets in batch runs.
177175
gbfs::apply_canned_gbfs_update(c, d);
178176

179177
auto response_time = stats{"response_time", 0U};

include/motis/gbfs/update.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ boost::asio::awaitable<void> update(config const&,
1616
std::shared_ptr<gbfs_data>&,
1717
metrics_registry const*);
1818

19-
// Loads the feeds once, synchronously, from a `dump_gbfs/` dump
20-
// (`gbfs.canned_gbfs: true`). Counterpart of `apply_canned_rt_update()`, for
21-
// batch runs that need reproducible rental routing.
2219
void apply_canned_gbfs_update(config const&, data&);
2320

2421
void run_gbfs_update(boost::asio::io_context&,

src/gbfs/update.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,13 @@ bool is_http_url(std::string_view const url) {
8383
return url.starts_with("http:") || url.starts_with("https:");
8484
}
8585

86-
// Dumping is enabled by creating a `dump_gbfs` directory next to the process,
87-
// exactly like `dump_rt` for GTFS-RT. Every fetched body is written to
88-
// `dump_gbfs/<feed_id>[/<system_id>]/<name>.json`, which is the layout the
89-
// directory-based reader (`fetch_file()` with `dir`) expects, so a dump can be
90-
// replayed with `gbfs.canned_gbfs: true`.
9186
bool gbfs_dump_enabled() {
9287
static auto const enabled = std::filesystem::is_directory("dump_gbfs");
9388
return enabled;
9489
}
9590

9691
std::filesystem::path gbfs_dump_root() { return {"dump_gbfs"}; }
9792

98-
// `dump_gbfs/<feed id>/`, with sub-feeds ("<manifest id>:<system id>") nested
99-
// so the layout matches what the directory reader expects.
10093
std::filesystem::path gbfs_dump_dir(std::string_view const feed_id) {
10194
auto dir = gbfs_dump_root();
10295
for (auto pos = std::size_t{0U}; pos <= feed_id.size();) {

0 commit comments

Comments
 (0)