Read big boards within the agents' reach: countries and remote from the enabled agents, Europe for favourites, filtered at the source by six hosts
app/jobs/reach.py derives each board's reach once per pull and the pull hands it to the runner through the batch payload. SmartRecruiters, Eightfold and SuccessFactors filter one country a request, Phenom a list, Workday and Oracle by host ids from facets. Remote beside countries is a series of its own, since two facets intersect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3adafd8950
commit
3462a4abe7
17 files changed
+1324
-116
No files matched your search
+13
-3
@@ -17,8 +17,12 @@ A target is `host:slug`, e.g. `greenhouse:databricks`, `ashby:deepl`,
|
||||
`lever:eu/tomtom`, `teamtailor:careers.acme.com`; each host module says what
|
||||
its slug is. Every board is read independently; one that fails is logged,
|
||||
recorded as failing under `ats:failing:<target>`, and skipped. A board's
|
||||
subscription `params` (`{"countries": ["DK"], "remote": true}`) are its
|
||||
filter, narrowed to what its reader declares (`_runner.ask_for`).
|
||||
filter is the `reach` option the pull hands it (the agents', see
|
||||
`app/jobs/reach.py`), over which its subscription `params` (`{"countries":
|
||||
["DK"], "remote": true}`, `{"reach": "all"}`) win, narrowed to what its
|
||||
reader declares (`_runner.ask_for`). An unfiltered read records the board's
|
||||
size under `ats:size:<target>`, which the reach reads to leave small boards
|
||||
whole.
|
||||
|
||||
The limits below are read when a board is read, so a test that replaces one
|
||||
on this module reaches the runner.
|
||||
@@ -349,7 +353,7 @@ class ATSSource(Source):
|
||||
raise ValueError(f"{target!r} is not host:slug for a known ATS host")
|
||||
module = readers.HOSTS[host]
|
||||
get = _getter(client, host, slug)
|
||||
ask = _runner.ask_for(module, self.params_for(target),
|
||||
ask = _runner.ask_for(module, self.params_for(target), self.options.get("reach"),
|
||||
keys=self.options.get("keys"))
|
||||
listing = _runner.read(self.state, "ats", target, module, slug, get, ask,
|
||||
limits=_limits())
|
||||
@@ -398,6 +402,12 @@ class ATSSource(Source):
|
||||
# its details again.
|
||||
_runner.stamp(self.state, "ats", target, run_marker, listing,
|
||||
[compound(i) for i in listing.ids])
|
||||
if not listing.filtered:
|
||||
size = len(listing.ids)
|
||||
if not listing.complete:
|
||||
kept = self.state.get(f"ats:size:{target}", "")
|
||||
size = max(size, int(kept) if kept.isdigit() else 0)
|
||||
self.state[f"ats:size:{target}"] = str(size)
|
||||
if detail_sets is not None:
|
||||
for key, ids in zip(detail_keys, detail_sets, strict=True):
|
||||
self.state[key] = json.dumps(sorted(ids))
|
||||
Reference in new issue
Block a user