Fix scheduled reports

This commit is contained in:
Anton Tananaev 2024-09-26 06:16:38 -07:00
parent d12403926b
commit e6c3d52e90
2 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.time.Duration;
import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.ZonedDateTime;
import java.time.temporal.Temporal;
import java.util.Date;
@ -87,6 +88,8 @@ public class Calendar extends ExtendedModel {
private static Instant temporalToInstant(Temporal temporal) {
if (temporal instanceof ZonedDateTime) {
return ((ZonedDateTime) temporal).toInstant();
} else if (temporal instanceof OffsetDateTime) {
return ((OffsetDateTime) temporal).toInstant();
} else if (temporal instanceof Instant) {
return (Instant) temporal;
} else {

View File

@ -94,7 +94,7 @@ public class TaskReports extends SingleScheduleTask {
}
}
}
} catch (StorageException e) {
} catch (Exception e) {
LOGGER.warn("Scheduled reports error", e);
}
}