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

Add schedule.json parameters to listjobs.json response #205

Closed
sieira opened this issue Jan 23, 2017 · 6 comments
Closed

Add schedule.json parameters to listjobs.json response #205

sieira opened this issue Jan 23, 2017 · 6 comments

Comments

@sieira
Copy link

sieira commented Jan 23, 2017

Is there a way to retrieve the parameters of a scheduled task?

Currently

$ curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider -d setting=DOWNLOAD_DELAY=2 -d arg1=val1

Returns

{"status": "ok",
 "pending": [{"id": "78391cc0fcaf11e1b0090800272a6d06", "spider": "somespider"}]
}

I wonder if there is a way to get:

{"status": "ok",
 "pending": [{
    "id": "78391cc0fcaf11e1b0090800272a6d06",
    "spider": "somespider",
    "setting": {"DOWNLOAD_DELAY": 2},
    "arg1": "val1"
}]
}
@Digenis
Copy link
Member

Digenis commented Jan 25, 2017

@sieira, no.
This information exists only for pending jobs.
I'd say scrapyd is far from providing this feature.
Also, I think we shouldn't provide an API for this
until we rewrite the webservice to accept parameters in a better format.

@jabadia
Copy link

jabadia commented Feb 20, 2020

Would you be willing to accept a patch with this enhancement?

  • store the arguments in ScrapyProcessProtocol() (around
    pp = ScrapyProcessProtocol(slot, project, msg['_spider'], \
    )
  • report the arguments in listjobs.json for pending, running and finished jobs

@jpmckinney
Copy link
Contributor

Maybe related: #39

@jpmckinney
Copy link
Contributor

jpmckinney commented Sep 24, 2021

store the arguments in ScrapyProcessProtocol()

Noting that this was the approach in the PR #254

@jpmckinney
Copy link
Contributor

See also comments in PR #272

@jpmckinney jpmckinney changed the title listjobs.json response does not contain parameters Add schedule.json parameters to listjobs.json response Jul 15, 2024
@jpmckinney
Copy link
Contributor

Done. Args are collected into args instead of being free-floating.

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

No branches or pull requests

4 participants