Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPCameraAgent Handle token lease and usage #731

Merged
merged 1 commit into from
Aug 23, 2024
Merged

Conversation

davidvng
Copy link
Contributor

Description

Add logic to handle Reolink's API token. Grabs token if doesn't already have one or lease is close to expired.

Motivation and Context

The agent grabbed a token in each loop before, reaching the limit of 20 max tokens per account.

How Has This Been Tested?

Tested on daq-dev

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@davidvng davidvng requested a review from BrianJKoopman August 23, 2024 17:51
Copy link
Member

@BrianJKoopman BrianJKoopman left a comment

Choose a reason for hiding this comment

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

Looks good to me, just one suggestion about input of the --renew-token duration. See below.

@BrianJKoopman BrianJKoopman self-requested a review August 23, 2024 19:19
@BrianJKoopman BrianJKoopman merged commit f0fecae into main Aug 23, 2024
7 checks passed
@BrianJKoopman BrianJKoopman deleted the http-camera-fix branch August 23, 2024 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants