Skip to content
Snippets Groups Projects
Commit e237faaf authored by Gwenaelle ABEILLE's avatar Gwenaelle ABEILLE
Browse files

add more information in state/status

parent d30b0d73
No related branches found
No related tags found
No related merge requests found
......@@ -91,6 +91,7 @@ public final class SnapArchiver {
SnapshotPersistenceManagerFactory factory = SnapshotPersistenceManagerFactory.getInstance();
manager = factory.getManager(beansFileName, dbUser, dbPassword);
state = DeviceState.ON;
status = "device ready for snapshot";
} catch (SnapshotingException e) {
throw e.toTangoException();
}
......@@ -244,11 +245,15 @@ public final class SnapArchiver {
// group.getMessages();
Map<String, String> messages = group.getMessages();
logger.debug("snapshot {} execution messages are {}", messages);
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("Snapshot ").append(snapId).append(" for context ").append(contextID).append("done.\n");
stringBuilder.append("Execution is ").append(isExecuted).append("\nMessages are ").append(messages);
state = DeviceState.ON;
} catch (SnapshotingException e) {
state = DeviceState.FAULT;
status = "snapshot failed " + e.toString();
logger.error("Exception received during TriggerLaunchSnapshot", e);
throw e.toTangoException();
} finally {
state = DeviceState.ON;
}
return snapId;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment