# You may obtain a copy of the License in the top-level directory # of this distribution and at: # # http://www.apache.org/licenses/LICENSE-2.0 # # No part of the project, including this file, may be copied, # modified, propagated, or distributed except according to the # terms contained in the LICENSE file. import celery import logging import config.parser as config from brain.helpers.celerytasks import route, async_call results_app = celery.Celery('resultstasks') config.conf_results_celery(results_app) probe_app = celery.Celery('probetasks') config.conf_probe_celery(probe_app) log = logging.getLogger(__name__) # ============ # Task calls # ============ def job_launch(ftpuser, filename, probename, task_id): """ send a task to the brain to flush the scan files""" log.debug("ftpuser %s filename %s probe %s" + " task_id %s",
# terms contained in the LICENSE file. import config.parser as config import celery import logging from celery.utils.log import get_task_logger import brain.controllers.probectrl as probe_ctrl import brain.controllers.frontendtasks as celery_frontend from brain.helpers.sql import session_query # Get celery's logger log = get_task_logger(__name__) results_app = celery.Celery('resultstasks') config.conf_results_celery(results_app) config.configure_syslog(results_app) # IRMA specific debug messages are enables through # config file Section: log / Key: debug if config.debug_enabled(): def after_setup_logger_handler(sender=None, logger=None, loglevel=None, logfile=None, format=None, colorize=None, **kwds): config.setup_debug_logger(logging.getLogger(__name__)) log.debug("debug is enabled")