Commit 8029f283 authored by Bronger, Torsten's avatar Bronger, Torsten
Browse files

Add possibility to drop the database for development purposes

parent 07081f57
......@@ -19,6 +19,9 @@ logger = setup_logging(logging.WARNING)
yaml = YAML()
configuration = yaml.load(Path("/etc/findrd/findrd.yaml"))
mongodb_client = MongoClient(configuration["mongodb_url"])
if configuration.get("reset_database"):
logger.fatal("Reset findRD database. FixMe: Disable that once we go into production!", extra={"my_module": "core"})
mongodb_client.drop_database("findRD")
database = mongodb_client.findRD
findings = database.findings
crawlings = database.crawlings
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment