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 JobStatus REST web service to easily get the status of a JobEspec… #260

Merged
merged 6 commits into from
Jul 16, 2024
Merged

Conversation

aleroot
Copy link

@aleroot aleroot commented Nov 22, 2017

Add a status.json REST endpoint to easily check the status of a single Job.

This feature can be used to poll the web service to notice when a single job has finished.

closes #5

scrapyd/VERSION Outdated Show resolved Hide resolved
@@ -19,6 +19,7 @@ webroot = scrapyd.website.Root
[services]
schedule.json = scrapyd.webservice.Schedule
cancel.json = scrapyd.webservice.Cancel
status.json = scrapyd.webservice.JobStatus
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better name the endpoint jobstatus to be more explicit
and consistent with other ws names

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't call the others jobschedule or jobcancel so I think I'll return this to status.

…ially useful to poll the status of single job, to be able then to retrieve results from Item endpoint
@codecov
Copy link

codecov bot commented Nov 22, 2017

Codecov Report

Merging #260 into master will decrease coverage by 1.55%.
The diff coverage is 9.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #260      +/-   ##
==========================================
- Coverage   68.37%   66.82%   -1.56%     
==========================================
  Files          16       16              
  Lines         819      841      +22     
  Branches       96      103       +7     
==========================================
+ Hits          560      562       +2     
- Misses        230      250      +20     
  Partials       29       29
Impacted Files Coverage Δ
scrapyd/webservice.py 26.61% <9.09%> (-3.3%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99a88ea...dd4f77a. Read the comment docs.

scrapyd/webservice.py Outdated Show resolved Hide resolved
@Digenis
Copy link
Member

Digenis commented Nov 22, 2017

Hi @aleroot,

welcome to scrapyd

I added commented on some lines.
Commit messages should be confined to 50 characters or less.
I still haven't reviewed the whole patch, I'll finish it tomorrow.

@aindong
Copy link

aindong commented Aug 8, 2019

Any news on this feature? Can we filter by jobid instead of returning the whole list of jobs?

@psdon
Copy link

psdon commented Jan 5, 2021

any news with this PR?

@Digenis
Copy link
Member

Digenis commented Apr 9, 2021

I think only docs/api.rst needs to be updated

it's a small change so it's possible to include it in 1.3

@Digenis Digenis added this to the 1.3.0 milestone Apr 9, 2021
@jpmckinney jpmckinney modified the milestones: 1.3.0, 1.4.0 May 13, 2022
@jpmckinney jpmckinney merged commit ac14f4b into scrapy:master Jul 16, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add status.json webservice to view status of specific job
5 participants