hyperswitch icon indicating copy to clipboard operation
hyperswitch copied to clipboard

feat(access_token): scheduler workflow implementation for access token

Open Narayanbhat166 opened this issue 2 years ago • 0 comments

Type of Change

  • [x] New feature

Description

This PR adds support for generating the access token by the scheduler. This will offload the task of generating the access token by a new payment and save us some time for a new payment.

Motivation and Context

Reduce access token creation time during payments.

How did you test it?

  • For testing purposes, the next schedule time is set to 60 seconds.

  • Create a payment using a connector which requires access_token for payment.

  • The process tracker entry is created. Screenshot 2023-04-11 at 4 12 09 PM

  • After one minute, new access token is created and stored in redis. The task is requeued and new schedule time is created. Screenshot 2023-04-11 at 4 14 58 PM

Checklist

  • [x] I formatted the code cargo +nightly fmt --all
  • [x] I addressed lints thrown by cargo clippy
  • [x] I reviewed submitted code

Narayanbhat166 avatar Apr 11 '23 10:04 Narayanbhat166