protected void serviceRun() {
long lastModificationTime = 0;
String lastFingerprint = "";
- while (!shouldStop()) {
+ while (!shouldStop()) { try {
/* check every seconds. */
sleep(1000);
}
}
}
- }
+ } catch (Throwable t1) {
+ logger.log(Level.SEVERE, "SoneInserter threw an Exception!", t1);
+ }}
}
/**
*
* @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
- private class InsertInformation {
+ private static class InsertInformation {
/** All properties of the Sone, copied for thread safety. */
private final Map<String, Object> soneProperties = new HashMap<String, Object>();
soneProperties.put("replies", new HashSet<Reply>(sone.getReplies()));
soneProperties.put("likedPostIds", new HashSet<String>(sone.getLikedPostIds()));
soneProperties.put("likedReplyIds", new HashSet<String>(sone.getLikedReplyIds()));
+ soneProperties.put("albums", Sone.flattenAlbums(sone.getAlbums()));
}
//