Skip to content

armgit / mwmbl

Public Imported from GitHub
0

An open source, non-profit web search engine

Check the API key is set

Daoud Clarke3c40f38ecf58
diff --git a/mwmbl/crawl.py b/mwmbl/crawl.py
index ab8a437..e211470 100644
--- a/mwmbl/crawl.py
+++ b/mwmbl/crawl.py
@@ -36,6 +36,8 @@ FORMAT = "%(process)d:%(levelname)s:%(name)s:%(message)s"
logging.basicConfig(level=logging.INFO, format=FORMAT)
API_KEY = os.environ["MWMBL_API_KEY"]
+assert API_KEY, "An environment variable MWMBL_API_KEY must be set to run the crawler"
+
BATCH_QUEUE_KEY = "batch-queue"