← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~ines-almeida/launchpad:update-duplicate-vulnerability-job-logic into launchpad:master

 


Diff comments:

> diff --git a/lib/lp/bugs/model/exportvulnerabilityjob.py b/lib/lp/bugs/model/exportvulnerabilityjob.py
> index 487ca57..37a71f4 100644
> --- a/lib/lp/bugs/model/exportvulnerabilityjob.py
> +++ b/lib/lp/bugs/model/exportvulnerabilityjob.py
> @@ -92,9 +92,10 @@ class ExportVulnerabilityJob(VulnerabilityJobDerived):
>              VulnerabilityJob.job_id == Job.id,
>              VulnerabilityJob.job_type == cls.class_job_type,
>              VulnerabilityJob.handler == handler,
> -            Job._status.is_in(
> -                (JobStatus.WAITING, JobStatus.RUNNING, JobStatus.SUSPENDED)
> -            ),
> +            Job._status.is_in((JobStatus.WAITING, JobStatus.RUNNING)),
> +            # If the job was scheduled more than 4 hours ago (twice the soft
> +            # time limit), we allow a new one to be created.
> +            Job.date_created > datetime.now(timezone.utc) - timedelta(hours=4),

Can we do something like, soft_time_limit * 2, if the var is defined somewhere?

>          ).one()
>  
>          if vulnerability_job is not None:


-- 
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/492931
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:update-duplicate-vulnerability-job-logic into launchpad:master.



References