issue-93 #108

Merged
sebastian merged 2 commits from issue-93 into master 2024-03-17 09:34:13 +01:00
Showing only changes of commit b4a82c745d - Show all commits

View File

@ -55,6 +55,7 @@ public class TaskSchedulingService {
public void sendRunningTaskNotification(AbstractSchedule abstractSchedule) { public void sendRunningTaskNotification(AbstractSchedule abstractSchedule) {
HttpClient httpClient = HttpClient.newHttpClient(); HttpClient httpClient = HttpClient.newHttpClient();
User user = abstractSchedule.getTask().getTaskgroup().getUser(); User user = abstractSchedule.getTask().getTaskgroup().getUser();
if(user.getNtfy_host() != null && user.getNtfy_topic() != null) {
try { try {
HttpRequest request = HttpRequest.newBuilder() HttpRequest request = HttpRequest.newBuilder()
.uri(new URI(user.getNtfy_host()+ "/" + user.getNtfy_topic())) .uri(new URI(user.getNtfy_host()+ "/" + user.getNtfy_topic()))
@ -70,6 +71,8 @@ public class TaskSchedulingService {
} }
} }
}
private static Date calculateDelayInMillis(LocalDateTime executionTime) { private static Date calculateDelayInMillis(LocalDateTime executionTime) {
return Date.from(executionTime.atZone(ZoneId.systemDefault()).toInstant()); return Date.from(executionTime.atZone(ZoneId.systemDefault()).toInstant());
} }