mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-19 11:38:21 -04:00
make tests pass, even with account_id
This commit is contained in:
parent
7af892aa26
commit
1f8af16a2a
2 changed files with 13 additions and 4 deletions
|
@ -105,3 +105,8 @@ max_claimed_sites:
|
||||||
|
|
||||||
pdfs_only:
|
pdfs_only:
|
||||||
type: boolean
|
type: boolean
|
||||||
|
|
||||||
|
account_id:
|
||||||
|
type:
|
||||||
|
- string
|
||||||
|
- integer
|
||||||
|
|
|
@ -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 = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue