private ILock saveJobUpdate(
JobUpdateStore.Mutable store,
IJobUpdate update,
JobUpdateStatus status) {
ILock lock;
try {
lock = lockManager.acquireLock(
ILockKey.build(LockKey.job(update.getSummary().getJobKey().newBuilder())), USER);
} catch (LockManager.LockException e) {
throw Throwables.propagate(e);
}
store.saveJobUpdate(update, Optional.of(lock.getToken()));
store.saveJobUpdateEvent(
IJobUpdateEvent.build(
new JobUpdateEvent()
.setStatus(status)
.setTimestampMs(clock.nowMillis())),