summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2019-12-10 15:02:39 +0100
committerSimon Rettberg2019-12-10 15:02:39 +0100
commit82a9af5beacd60fd1526b3b72734dc8484fb8be6 (patch)
tree5022d39fd4f63219399f4cf82983e057a863d020
parent[scripts/mount-store] Semi-support custom local mounts in "internal" mode (diff)
downloadtmlite-bwlp-82a9af5beacd60fd1526b3b72734dc8484fb8be6.tar.gz
tmlite-bwlp-82a9af5beacd60fd1526b3b72734dc8484fb8be6.tar.xz
tmlite-bwlp-82a9af5beacd60fd1526b3b72734dc8484fb8be6.zip
Simplify some code, remove unused stuff
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/DownloadFiles.java10
-rw-r--r--src/main/java/org/openslx/taskmanager/tasks/RemoteReboot.java4
2 files changed, 3 insertions, 11 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/DownloadFiles.java b/src/main/java/org/openslx/taskmanager/tasks/DownloadFiles.java
index c274462..942eca9 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/DownloadFiles.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/DownloadFiles.java
@@ -182,10 +182,7 @@ public class DownloadFiles extends AbstractTask
} catch ( InterruptedException e ) {
Thread.currentThread().interrupt();
}
- try {
- FileUtils.forceDelete( gpgDir );
- } catch ( Exception e1 ) {
- }
+ FileUtils.deleteQuietly( gpgDir );
if ( retval.get() ) {
// Move dir to proper location
File dest = new File( this.baseDir );
@@ -203,10 +200,7 @@ public class DownloadFiles extends AbstractTask
}
}
if ( !retval.get() ) {
- try {
- FileUtils.forceDelete( tmpDir.toFile() );
- } catch ( Exception e ) {
- }
+ FileUtils.deleteQuietly( tmpDir.toFile() );
}
return retval.get();
}
diff --git a/src/main/java/org/openslx/taskmanager/tasks/RemoteReboot.java b/src/main/java/org/openslx/taskmanager/tasks/RemoteReboot.java
index 0e09a85..f5d9a4b 100644
--- a/src/main/java/org/openslx/taskmanager/tasks/RemoteReboot.java
+++ b/src/main/java/org/openslx/taskmanager/tasks/RemoteReboot.java
@@ -52,7 +52,7 @@ public class RemoteReboot extends AbstractTask
private Output status = new Output();
- private static final String BASE_CMD = "/opt/openslx/scripts/idleaction-scheduled_action --detach";
+ private static final String BASE_CMD = "/opt/openslx/scripts/idleaction-scheduled_action";
private static final String REBOOT_CMD = BASE_CMD + " reboot";
@@ -81,7 +81,6 @@ public class RemoteReboot extends AbstractTask
if ( status.error != null )
return false;
- status.clients = clients;
Date shutdownTime = new Date( System.currentTimeMillis() + minutes * 60 * 1000 );
SimpleDateFormat sdf = new SimpleDateFormat( "HH:mm" );
status.time = sdf.format( shutdownTime );
@@ -267,7 +266,6 @@ public class RemoteReboot extends AbstractTask
static class Output
{
private Map<String, ClientStatus> clientStatus = new ConcurrentHashMap<>();
- private Client[] clients;
private String time;
private String locationId;
private String error;