class TaskProducer {

    public static boolean produceTask(ExecutorTask executorTask) {
        if (executorTask.isPersistent()) {
            try {
                DBQueue.getInstance().put(executorTask);
            } catch (SQLException e) {
                SwiftLoggers.getLogger().error("task {} insert db failed! ", executorTask, e);
            }
        }
        return MemoryQueue.getInstance().offer(executorTask);
    }

}