Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_scheduled_jobs_specs is not working with GraphManager #9

Closed
VMRuiz opened this issue Aug 31, 2020 · 1 comment
Closed

get_scheduled_jobs_specs is not working with GraphManager #9

VMRuiz opened this issue Aug 31, 2020 · 1 comment

Comments

@VMRuiz
Copy link

VMRuiz commented Aug 31, 2020

The current version of get_scheduled_jobs_specs doesn't work

def get_scheduled_jobs_specs(manager, job_ids):
    """
    Return the jobs specs of the jobs scheduled by the jobs identified
    by given job_ids
    Each job spec is a 3-element tuple which contains, in order:
        - the kind of task job (spider/task)
        - the complete id name of the task job
        - the job id of the of the task job
    """
    scheduled_jobs = []
    for jobid in job_ids:
        job = manager.project.jobs.get(jobid)
        for l in job.logs.iter_values():
            if 'message' not in l:
                continue
            m = _search_scheduled_line(l['message'])
            if m:
                scheduled_jobs.append(m)
    return scheduled_jobs

GraphManager doesn't have a attribute name project.

Also, job.logs doesn't have an attribute name iter_values

@kalessin
Copy link
Member

This issue has been fixed on

970e79f

and

54f6d21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants