Skip to content

Commit

Permalink
feat: Do not mark a job as succeeded on login success
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleface committed Apr 5, 2022
1 parent 49565f4 commit 5cf479c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cozy-harvest-lib/src/models/ConnectionFlow.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,8 @@ export class ConnectionFlow {
}

handleLoginSuccess() {
this.jobWatcher.handleSuccess()
this.jobWatcher.handleLoginSuccess()
this.triggerEvent(LOGIN_SUCCESS_EVENT)
}

handleLoginSuccessHandled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export class KonnectorJobWatcher {
this.emit('error', new KonnectorJobError(error))
}

handleLoginSuccess() {
logger.info(`KonnectorJobWatcher: login success`)
this.disableSuccessTimer()
}

handleSuccess() {
logger.info(`KonnectorJobWatcher: Job has succeeded`)
this.disableSuccessTimer()
Expand Down

0 comments on commit 5cf479c

Please sign in to comment.