} else {
sync = new PushSynchronizer(getContext().getLogger(),db,storage,proc);
}
try {
sync.setSynchronizationAt(new Date());
sync.sync();
if (sync.getErrorCount()>0) {
getResponse().setStatus(Status.SERVER_ERROR_INTERNAL);
return new StringRepresentation("There were "+sync.getErrorCount()+" synchronization errors. See the log for details.");
} else {
getResponse().setStatus(Status.SUCCESS_OK);