@Override
    public void run() {
        while (!Thread.currentThread().isInterrupted()) {
            try {
                TrendBar bar = doneBars.take();
                trendBarDao.addTrendBar(bar);
            } catch (InterruptedException e) {
                executorService.shutdown();
                Thread.currentThread().interrupt();
            }
        }
    }