Ejemplo n.º 1
0
from timesketch.lib.analyzers import manager
from timesketch.lib.datastores.opensearch import OpenSearchDataStore
from timesketch.lib.utils import read_and_validate_csv
from timesketch.lib.utils import read_and_validate_jsonl
from timesketch.lib.utils import send_email
from timesketch.models import db_session
from timesketch.models.sketch import Analysis
from timesketch.models.sketch import AnalysisSession
from timesketch.models.sketch import SearchIndex
from timesketch.models.sketch import Sketch
from timesketch.models.sketch import Timeline
from timesketch.models.user import User


logger = logging.getLogger("timesketch.tasks")
celery = create_celery_app()


PLASO_MINIMUM_VERSION = 20201228


# pylint: disable=unused-argument
@signals.after_setup_logger.connect
def setup_loggers(*args, **kwargs):
    """Configure the logger."""
    configure_logger()


def get_import_errors(error_container, index_name, total_count):
    """Returns a string with error message or an empty string if no errors.
Ejemplo n.º 2
0
 def __init__(self):
     super().__init__()
     # pylint: disable=import-outside-toplevel
     from timesketch.app import create_celery_app
     self.celery = create_celery_app()