# Path: voeventdb/server/database/ingest.py
# def load_from_tarfile(session, tarfile_path, check_for_duplicates,
#                       pkts_per_commit=1000):
# 
# Path: voeventdb/server/database/db_utils.py
# def check_database_exists(db_url):
# def create_empty_database(admin_db_url, new_db_name):
# def delete_database(admin_db_url, drop_db_name):
# def load_q3c(connection):
# def create_tables_and_indexes(connection):


import sys
import os
import argparse
import logging
import voeventdb.server.database.config as dbconfig
import click
from sqlalchemy.engine.url import make_url
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from voeventdb.server.database import ingest, db_utils
#!/usr/bin/env python





logging.basicConfig(level=logging.INFO)
logging.getLogger('iso8601').setLevel(
        logging.ERROR)  # Suppress iso8601 debug log.
logger = logging.getLogger("voeventdb-ingest")


@click.command()
@click.option('-d', '--dbname',
              default=str(dbconfig.testdb_corpus_url.database),
              help="Database to load to, default='{}'".format(
                  dbconfig.testdb_corpus_url.database
              ))
@click.option('--check/--no-check', default=False,

# Path: voeventdb/server/database/ingest.py
# def load_from_tarfile(session, tarfile_path, check_for_duplicates,
#                       pkts_per_commit=1000):
# 
# Path: voeventdb/server/database/db_utils.py
# def check_database_exists(db_url):
# def create_empty_database(admin_db_url, new_db_name):
# def delete_database(admin_db_url, drop_db_name):
# def load_q3c(connection):
# def create_tables_and_indexes(connection):


# Path: voeventdb/server/bin/voeventdb_ingest_tarball.py
import sys
import os
import argparse
import logging
import voeventdb.server.database.config as dbconfig
import click
from sqlalchemy.engine.url import make_url
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from voeventdb.server.database import ingest, db_utils

#!/usr/bin/env python





logging.basicConfig(level=logging.INFO)
logging.getLogger('iso8601').setLevel(
        logging.ERROR)  # Suppress iso8601 debug log.
logger = logging.getLogger("voeventdb-ingest")


@click.command()
@click.option('-d', '--dbname',
              default=str(dbconfig.testdb_corpus_url.database),
              help="Database to load to, default='{}'".format(
                  dbconfig.testdb_corpus_url.database
              ))
@click.option('--check/--no-check', default=False,

              help="Check for (and ignore) duplicate packets. Default behaviour "