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

Fix Oura offset issues #141

Merged
merged 3 commits into from
Jul 10, 2024
Merged

Fix Oura offset issues #141

merged 3 commits into from
Jul 10, 2024

Conversation

mpgxvii
Copy link
Member

@mpgxvii mpgxvii commented Jul 10, 2024

  • Fixes initialisation of KafkaOffsetManager: timestamps are stored in seconds and should be processed as seconds
  • Add back off time when no records are found
  • When no records are found, reduce the check for time after request from 30 days to 10 days

@mpgxvii mpgxvii requested a review from yatharthranjan July 10, 2024 09:57
Copy link
Member

@yatharthranjan yatharthranjan 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. a minor change requested.

@mpgxvii mpgxvii merged commit 1aebe6a into dev Jul 10, 2024
8 checks passed
@mpgxvii mpgxvii deleted the fix/offset-manager branch July 10, 2024 14:01
@mpgxvii mpgxvii mentioned this pull request Jul 10, 2024
@@ -242,8 +242,8 @@ constructor(
companion object {
private val logger = LoggerFactory.getLogger(OuraRequestGenerator::class.java)
private val BACK_OFF_TIME = Duration.ofMinutes(10L)
private val ONE_DAY = 1L
private val TIME_AFTER_REQUEST = Duration.ofDays(10)
private val ONE_DAY = Duration.ofDays(1L)
Copy link
Member

Choose a reason for hiding this comment

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

i think you forgot to update the userNextRequest[request.user.versionedId] = Instant.now().plus(BACK_OFF_TIME) with ONE_DAY on line 154.

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