job

Extend the lock of a job delivered over the gRPC job stream

Changed on

Moves the lock deadline of a job to now plus lockDuration (absent: the lock duration of the subscription the job was delivered under, capped by jobManager.maxLockDurationMs) and answers the new deadline. clientId is the client id of the job stream the job was delivered to; a job which is not locked at the moment (the lock lapsed, the job was completed or failed) or which is locked for a different client answers 409, and the job itself is left untouched. With deliveryToken only the lock of that delivery is extended: a lock the job holds for another delivery, as after this delivery's lock lapsed and the job came back to the same client, answers 409 too. It exists for workers which receive jobs over the stream but send their commands over REST. Jobs fetched through GET /jobs hold no lock and cannot extend one.

post/jobs/{jobKey}/extend-lock

Request

  • Base URL: http://localhost:8080/v1
  • URL: http://localhost:8080/v1/jobs/{jobKey}/extend-lock
  • Auth: none declared

Path parameters

jobKeyinteger required

Request body

clientIdstring required

The client id of the job stream the job was delivered to.

deliveryTokeninteger

The delivery_token of the delivery whose lock to extend. Absent, the lock the client holds on the job is extended, whichever delivery it belongs to.

lockDurationstring

ISO-8601 duration to lock the job for, counted from now. Absent means the subscription's lock duration.

Example request

{
  "lockDuration": "PT5M"
}

Response

Lock extended

lockUntilstring date-time required

When the extended lock lapses, on the clock of the partition leader.

Changes