fix task configuration

Change-Id: I5a399083eabfdde99bd73af8b121bcf07117e26b
This commit is contained in:
suhaiming 2020-12-23 01:46:20 +00:00
parent 53990ad4e2
commit 572e414114
5 changed files with 6 additions and 10 deletions

View File

@ -13,11 +13,10 @@
# under the License.
"""A Timer Task With APScheduler."""
from oslo_config import cfg
from oslo_log import log as logging
from venus.task.core import delete_es_index_task
CONF = cfg.CONF
LOG = logging.getLogger(__name__)

View File

@ -16,13 +16,12 @@
SQLAlchemy models for venus data.
"""
from oslo_config import cfg
from oslo_db.sqlalchemy import models
from oslo_utils import timeutils
from sqlalchemy import Column
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import DateTime, String
CONF = cfg.CONF
from venus.conf import CONF
BASE = declarative_base()

View File

@ -16,16 +16,15 @@
import socket
import time
from oslo_config import cfg
from oslo_db import options
from oslo_log import log as logging
from venus.conf import CONF
from venus.db.common import _create_facade_lazily
from venus.i18n import _LE
from venus.task.backends import models
# abc
CONF = cfg.CONF
CONF.import_group("profiler", "venus.service")
log = logging.getLogger(__name__)
options.set_defaults(CONF, connection='sqlite:///$state_path/venus.sqlite')

View File

@ -16,17 +16,18 @@ import datetime
import six
import time
from oslo_config import cfg
from oslo_log import log as logging
from venus.common import utils
from venus.conf import CONF
from venus.modules.custom_config.backends.sql import CustomConfigSql
from venus.modules.search.search_lib import ESSearchObj
from venus.i18n import _LE, _LI
from venus.task.backends.sql import TaskSql
CONF = cfg.CONF
LOG = logging.getLogger(__name__)
TASK_NAME = "delete_es_index"

View File

@ -14,12 +14,10 @@
"""A Timer Task With APScheduler."""
from apscheduler.schedulers.blocking import BlockingScheduler
from oslo_config import cfg
from oslo_log import log as logging
from venus.task import adapter
LOG = logging.getLogger(__name__)
CONF = cfg.CONF
sched = BlockingScheduler()