mirror of https://github.com/scrapy/scrapy.git
scrapyd: updated schedule.json response format
This commit is contained in:
parent
17cc90e3fe
commit
bff3d31469
|
|
@ -386,7 +386,7 @@ Scheduling a spider run
|
|||
To schedule a spider run::
|
||||
|
||||
$ curl http://localhost:6800/schedule.json -d project=myproject -d spider=spider2
|
||||
{"status": "ok"}
|
||||
{"status": "ok", "jobid": "26d1b1a6d6f111e0be5c001e648c57f8"}
|
||||
|
||||
For more resources see: :ref:`topics-scrapyd-jsonapi` for more available resources.
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,7 @@ class Schedule(WsResource):
|
|||
jobid = uuid.uuid1().hex
|
||||
args['_job'] = jobid
|
||||
self.root.scheduler.schedule(project, spider, **args)
|
||||
jobids = {spider: jobid}
|
||||
return {"status": "ok", "jobs": jobids}
|
||||
return {"status": "ok", "jobid": jobid}
|
||||
|
||||
class AddVersion(WsResource):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue