Skip to content

Commit

Permalink
fix: HS-154: OrcaLogger setTimeout intervals changed (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsrivatsa-edinburgh authored Nov 13, 2023
1 parent 3abbe0a commit 346cde3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/Payments/ApplePay.res
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
type props = {sessionObj: option<Js.Json.t>, list: PaymentMethodsRecord.list}

let default = (props: props) => {
let loggerState = Recoil.useRecoilValueFromAtom(RecoilAtoms.loggerAtom)
let {publishableKey} = Recoil.useRecoilValueFromAtom(RecoilAtoms.keys)
let setIsShowOrPayUsing = Recoil.useSetRecoilState(RecoilAtoms.isShowOrPayUsing)
let (showApplePay, setShowApplePay) = React.useState(() => false)
let (showApplePayLoader, setShowApplePayLoader) = React.useState(() => false)
let intent = PaymentHelpers.usePaymentIntent(None, Applepay)
let sync = PaymentHelpers.usePaymentSync(Some(loggerState), Applepay)
let sync = PaymentHelpers.usePaymentSync(None, Applepay)
let options = Recoil.useRecoilValueFromAtom(RecoilAtoms.optionAtom)
let (applePayClicked, setApplePayClicked) = React.useState(_ => false)
let isApplePaySDKFlow = props.sessionObj->Belt.Option.isSome
Expand Down
8 changes: 4 additions & 4 deletions src/orca-log-catcher/OrcaLogger.res
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ let make = (~sessionId=?, ~source: option<source>=?, ~clientSecret=?, ~merchantI
switch timeOut.contents {
| Some(val) => {
Js.Global.clearTimeout(val)
timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 10000))
timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 120000))
}
| None => timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 10000))
| None => timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 120000))
}
beaconApiCall(mainLogFile)
let len = mainLogFile->Js.Array2.length
Expand Down Expand Up @@ -449,9 +449,9 @@ let make = (~sessionId=?, ~source: option<source>=?, ~clientSecret=?, ~merchantI
switch timeOut.contents {
| Some(val) => {
Js.Global.clearTimeout(val)
timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 2000))
timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 20000))
}
| None => timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 2000))
| None => timeOut := Some(Js.Global.setTimeout(() => sendLogs(), 20000))
}

if mainLogFile->checkForPriorityEvents {
Expand Down

0 comments on commit 346cde3

Please sign in to comment.