Skip to content

Logging first time instance reports it is ready to use - #3733

Merged
t2gran merged 6 commits into
opentripplanner:dev-2.xfrom
entur:otp2_log_readiness
Nov 23, 2021
Merged

Logging first time instance reports it is ready to use#3733
t2gran merged 6 commits into
opentripplanner:dev-2.xfrom
entur:otp2_log_readiness

Conversation

@lassetyr

@lassetyr lassetyr commented Nov 10, 2021

Copy link
Copy Markdown
Contributor

Logging the first time all updaters report being initialized and instance is ready to process requests. This makes it easier to calculate complete startup-time.

@lassetyr lassetyr added !Improvement A functional improvement or micro feature Entur Test This is currently being tested at Entur labels Nov 10, 2021
@lassetyr
lassetyr requested a review from a team as a code owner November 10, 2021 12:30
Comment thread src/ext/java/org/opentripplanner/ext/actuator/ActuatorAPI.java Outdated
Comment thread src/main/java/org/opentripplanner/updater/GraphUpdaterManager.java
Comment thread src/ext/java/org/opentripplanner/ext/actuator/ActuatorAPI.java Outdated
@t2gran
t2gran force-pushed the otp2_log_readiness branch from 300f712 to 6391ef1 Compare November 12, 2021 13:05
@t2gran t2gran added this to the 2.1 milestone Nov 12, 2021
private final OtpProjectInfo projectInfo = projectInfo();

// TODO Remove this field, use Router.routerId ?
public String routerId;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍾

public Response health() {
if (router.graph.updaterManager != null) {
Collection<String> waitingUpdaters = router.graph.updaterManager.waitingUpdaters();
var waitingForUpdaters = router.graph.updaterManager.listNonePrimedUpdaters();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should change the method name to listUnprimedUpdaters. I was a little confused at first.

}

/**
* This method start a task during startup, witch update the 'numberOfNonePrimedUpdaters'. It

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename the reference to numberOfNonePrimedUpdaters.

@leonardehrenfried leonardehrenfried left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small comments about names.

@t2gran
t2gran merged commit cf035e4 into opentripplanner:dev-2.x Nov 23, 2021
@t2gran
t2gran deleted the otp2_log_readiness branch November 23, 2021 09:51
t2gran pushed a commit that referenced this pull request Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Entur Test This is currently being tested at Entur !Improvement A functional improvement or micro feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants