diff --git a/bugwarrior/db.py b/bugwarrior/db.py index 1abcf2361..45874fbb5 100644 --- a/bugwarrior/db.py +++ b/bugwarrior/db.py @@ -26,10 +26,6 @@ ) -# Sentinel value used for aborting processing of tasks -ABORT_PROCESSING = 2 - - class URLShortener(object): _instance = None @@ -335,8 +331,6 @@ def _bool_option(section, option, default): } for issue in issue_generator: - if isinstance(issue, tuple) and issue[0] == ABORT_PROCESSING: - raise RuntimeError(issue[1]) try: existing_uuid = find_local_uuid( tw, key_list, issue, legacy_matching=legacy_matching diff --git a/bugwarrior/services/__init__.py b/bugwarrior/services/__init__.py index 6ff971a72..5c3569244 100644 --- a/bugwarrior/services/__init__.py +++ b/bugwarrior/services/__init__.py @@ -14,7 +14,7 @@ from taskw.task import Task from bugwarrior.config import asbool, get_service_password -from bugwarrior.db import MARKUP, URLShortener, ABORT_PROCESSING +from bugwarrior.db import MARKUP, URLShortener # Sentinels for process completion status @@ -563,9 +563,11 @@ def aggregate_issues(conf, main_section): completion_type, args = issue if completion_type == SERVICE_FINISHED_ERROR: target, e = args + log.name('bugwarrior').info("Terminating workers") for process in processes: process.terminate() - yield ABORT_PROCESSING, e + raise RuntimeError( + "critical error in target '{}'".format(target)) currently_running -= 1 continue yield issue