use of org.atlasapi.messaging.v3.ScheduleUpdateMessage in project atlas-persistence by atlasapi.
the class MongoScheduleStore method sendUpdateMessage.
private void sendUpdateMessage(Publisher publisher, Channel channel, Interval interval) {
String mid = UUID.randomUUID().toString();
Timestamp ts = timestamper.timestamp();
String src = publisher.key();
String cid = idCodec.encode(BigInteger.valueOf(channel.getId()));
DateTime start = interval.getStart();
DateTime end = interval.getEnd();
ScheduleUpdateMessage msg = new ScheduleUpdateMessage(mid, ts, src, cid, start, end);
try {
messageSender.sendMessage(msg, msg.getChannel().getBytes());
} catch (MessagingException e) {
String errMsg = String.format("%s %s %s", src, cid, interval);
log.error(errMsg, e);
}
}
Aggregations