Conversation
Signed-off-by: Dima Dorezyuk <ddo@qwello.eu>
Signed-off-by: Dima Dorezyuk <ddo@qwello.eu>
7d4e408 to
a173fd5
Compare
hovinen
left a comment
There was a problem hiding this comment.
I might need you to walk me through some of these changes, since I'm not so familiar with all of the components involved.
| } | ||
| constants::TerminalStatusCode::ReconciliationRequired => { | ||
| info!("Reconciliation required, running end of day"); | ||
| self.end_of_day().await?; |
There was a problem hiding this comment.
We wouldn't know a failure occurred here, since end_of_day doesn't log failure. Do we want to add some failure log there, here, or log the error when calling configure? Same goes for failure of set_terminal_id, initialize, and run_diagnosis below.
There was a problem hiding this comment.
Better yet - since if this function fails we won't have a working PT on a pole, better log it in the calling function and add an alert for this failure to track it
hovinen
left a comment
There was a problem hiding this comment.
LGTM based on our discussion yesterday. Please see also my comments.
Signed-off-by: Dima Dorezyuk <ddo@qwello.eu>
Signed-off-by: Dima Dorezyuk <ddo@qwello.eu>
bfe2f3e to
b76ab59
Compare
Currently we run init and diagnostics on every start up - until the
successfully_configureflag is set. While being a simple logic this results in lots of unnecessary transactions (inti and diagnostics are transactions from the view of the payment provider backend and 1. cost money and 2. can overload the payment provider backend).The idea is to query the payment terminal (status inquiry, which is fast and does not result in calls to the payment provider backend) and based on the return code to reason if we need to run the aforementioned commands.
The status inquiry returns the terminal_status_code, which is defined under chapter 11 of zvt.