scrapyd: updated schedule.json response format

This commit is contained in:
Pablo Hoffman 2011-09-04 09:29:24 -03:00
parent 17cc90e3fe
commit bff3d31469
2 changed files with 2 additions and 3 deletions

View File

@ -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.

View File

@ -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):