execution service: Don't try to send empty bulk requests
Closes elastic/elasticsearch#264 Original commit: elastic/x-pack-elasticsearch@f636bfd956
This commit is contained in:
parent
e438c51555
commit
5bc491d359
|
@ -125,6 +125,10 @@ public class ExecutionService extends AbstractComponent {
|
|||
}
|
||||
|
||||
logger.debug("saving watch records [{}]", records.size());
|
||||
if (records.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (records.size() == 1) {
|
||||
final WatchRecord watchRecord = records.getFirst();
|
||||
final TriggeredExecutionContext ctx = contexts.getFirst();
|
||||
|
@ -186,6 +190,10 @@ public class ExecutionService extends AbstractComponent {
|
|||
}
|
||||
|
||||
logger.debug("saving watch records [{}]", records.size());
|
||||
if (records.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (records.size() == 1) {
|
||||
final WatchRecord watchRecord = records.getFirst();
|
||||
final TriggeredExecutionContext ctx = contexts.getFirst();
|
||||
|
|
Loading…
Reference in New Issue