Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions ingestify/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import click
from dotenv import find_dotenv, load_dotenv

from ingestify.exceptions import ConfigurationError
from ingestify.exceptions import ConfigurationError, StopProcessing
from ingestify.main import get_engine

from ingestify import __version__
Expand Down Expand Up @@ -116,7 +116,11 @@ def run(
if debug:
logging.getLogger("root").setLevel(logging.DEBUG)

engine.load(dry_run=dry_run, provider=provider, source=source)
try:
engine.load(dry_run=dry_run, provider=provider, source=source)
except StopProcessing as e:
logger.warning(f"Stopped early: {e}")
sys.exit(e.exit_code)

logger.info("Done")

Expand Down
Loading