public long Run(CancellationToken token)
{
var records = _moveRecords.Handle(new MoveDelayedRecordsCommand(token));
var total = records;
while (records > 0)
{
if (token.IsCancellationRequested)
return total;
records = _moveRecords.Handle(new MoveDelayedRecordsCommand(token));
total += records;
}
return total;
}
}