File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
oura-library/src/main/kotlin/org/radarbase/oura/request Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -145,11 +145,13 @@ constructor(
145145 ? : nextRequestTime
146146 } else {
147147 if (request.startDate.plus(TIME_AFTER_REQUEST ).isBefore(Instant .now())) {
148+ logger.info(" No records found, updating offsets to end date.." )
148149 ouraOffsetManager.updateOffsets(
149150 request.route,
150151 request.user,
151152 request.endDate,
152153 )
154+ userNextRequest[request.user.versionedId] = Instant .now().plus(BACK_OFF_TIME )
153155 }
154156 }
155157 return records
@@ -241,7 +243,7 @@ constructor(
241243 private val logger = LoggerFactory .getLogger(OuraRequestGenerator ::class .java)
242244 private val BACK_OFF_TIME = Duration .ofMinutes(10L )
243245 private val ONE_DAY = 1L
244- private val TIME_AFTER_REQUEST = Duration .ofDays(30 )
246+ private val TIME_AFTER_REQUEST = Duration .ofDays(10 )
245247 private val USER_BACK_OFF_TIME = Duration .ofHours(12L )
246248 private val SUCCESS_BACK_OFF_TIME = Duration .ofMinutes(1L )
247249 private val USER_MAX_REQUESTS = 20
You can’t perform that action at this time.
0 commit comments