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

Implement peak commands #40

Open
vimukthi-git opened this issue May 14, 2017 · 0 comments
Open

Implement peak commands #40

vimukthi-git opened this issue May 14, 2017 · 0 comments

Comments

@vimukthi-git
Copy link
Member

The peek commands let the client inspect a job in the system. There are four
variations. All but the first operate only on the currently used tube.

  • "peek \r\n" - return job .

  • "peek-ready\r\n" - return the next ready job.

  • "peek-delayed\r\n" - return the delayed job with the shortest delay left.

  • "peek-buried\r\n" - return the next job in the list of buried jobs.

There are two possible responses, either a single line:

  • "NOT_FOUND\r\n" if the requested job doesn't exist or there are no jobs in
    the requested state.

Or a line followed by a chunk of data, if the command was successful:

FOUND <id> <bytes>\r\n
<data>\r\n
  • is the job id.

  • is an integer indicating the size of the job body, not including
    the trailing "\r\n".

  • is the job body -- a sequence of bytes of length from the
    previous line.

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

1 participant