File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
oura-library/src/main/kotlin/org/radarbase/oura/request Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ constructor(
9090 offsetTime.coerceAtLeast(startDate)
9191 }
9292 val endDate = if (user.endDate >= Instant .now()) Instant .now() else user.endDate
93- if (Duration .between(startOffset, endDate).toDays() <= ONE_DAY ) {
93+ if (Duration .between(startOffset, endDate) <= ONE_DAY ) {
9494 logger.info(" Interval between dates is too short. Backing off.." )
9595 userNextRequest[user.versionedId] = Instant .now().plus(USER_BACK_OFF_TIME )
9696 return emptySequence()
@@ -242,8 +242,8 @@ constructor(
242242 companion object {
243243 private val logger = LoggerFactory .getLogger(OuraRequestGenerator ::class .java)
244244 private val BACK_OFF_TIME = Duration .ofMinutes(10L )
245- private val ONE_DAY = 1L
246- private val TIME_AFTER_REQUEST = Duration .ofDays(10 )
245+ private val ONE_DAY = Duration .ofDays( 1L )
246+ private val TIME_AFTER_REQUEST = Duration .ofDays(30 )
247247 private val USER_BACK_OFF_TIME = Duration .ofHours(12L )
248248 private val SUCCESS_BACK_OFF_TIME = Duration .ofMinutes(1L )
249249 private val USER_MAX_REQUESTS = 20
You can’t perform that action at this time.
0 commit comments