in hq/app/aws/iam/CredentialsReport.scala [20:31]
def isComplete(report: GenerateCredentialReportResponse): Boolean =
report.state == ReportStateType.COMPLETE
def credentialsReportReadyForRefresh(currentReport: Either[FailedAttempt, CredentialReportDisplay], currentTime: DateTime): Boolean = {
currentReport match {
case Left(_) => true
case Right(credentialReportDisplay) => {
val timeSinceLastReport = Seconds.secondsBetween(credentialReportDisplay.reportDate, currentTime)
timeSinceLastReport.isGreaterThan(Hours.hours(4).toStandardSeconds)
}
}
}