Skip to content

Commit 7137f9b

Browse files
committed
Finish the NO_EMAIL_FOUND rename and the provider-seam import in the job loop: main was red on both
1 parent 34e1d74 commit 7137f9b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

openoutreach/core/job.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def _work_to_goal(campaign, goal: Goal, on_new_lead, buy_addresses: bool,
102102
started: float) -> JobResult:
103103
"""The loop itself. Every exit is a ``JobResult``; none of them raises."""
104104
from openoutreach.core.cycle import HALTING_ERRORS, run_one_action
105-
from openoutreach.enrichment.bettercontact import BetterContactUnavailable
105+
from openoutreach.enrichment.provider import ProviderUnavailable
106106

107107
baseline = _unit_ids(campaign, goal.unit)
108108
result = JobResult(goal=goal)
@@ -122,7 +122,7 @@ def _work_to_goal(campaign, goal: Goal, on_new_lead, buy_addresses: bool,
122122
"and llm_api_base"
123123
)
124124
return result
125-
except BetterContactUnavailable as exc:
125+
except ProviderUnavailable as exc:
126126
# A refusal the provider will repeat — a rejected key, an empty wallet, a
127127
# 429 that outlasted its backoff. Discovery raises these rather than
128128
# returning an empty page, so the run ends naming the refusal instead of

tests/test_job.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def test_a_miss_does_not_spend_the_goal(self, campaign):
193193
def miss_twice_then_hit(deal):
194194
submissions.append(deal.pk)
195195
if len(submissions) <= 2:
196-
return DealState.NO_EMAIL_BETTERCONTACT
196+
return DealState.NO_EMAIL_FOUND
197197
deal.lead.email = f"lead{deal.pk}@acme.com"
198198
deal.lead.save(update_fields=["email"])
199199
return DealState.RESOLVED

0 commit comments

Comments
 (0)