make tests pass, even with account_id

This commit is contained in:
Barbara Miller 2025-07-25 14:11:46 -07:00
parent 7af892aa26
commit 1f8af16a2a
2 changed files with 13 additions and 4 deletions

View file

@ -105,3 +105,8 @@ max_claimed_sites:
pdfs_only: pdfs_only:
type: boolean type: boolean
account_id:
type:
- string
- integer

View file

@ -98,10 +98,14 @@ def new_job(frontier, job_conf):
frontier.rr, frontier.rr,
{"conf": job_conf, "status": "ACTIVE", "started": doublethink.utcnow()}, {"conf": job_conf, "status": "ACTIVE", "started": doublethink.utcnow()},
) )
job.id = job_conf.get("id") if "id" in job_conf:
job.account_id = job_conf.get("account_id") job.id = job_conf["id"]
job.max_claimed_sites = job_conf.get("max_claimed_sites") if "max_claimed_sites" in job_conf:
job.pdfs_only = job_conf.get("pdfs_only") job.max_claimed_sites = job_conf["max_claimed_sites"]
if "pdfs_only" in job_conf:
job.pdfs_only = job_conf["pdfs_only"]
if "account_id" in job_conf:
job.account_id = job_conf.["account_id"]
job.save() job.save()
sites = [] sites = []