API for Remote Runner job states?

Hi!

My project has a custom peertube client that calls somewhat obscure api endpoints.
For example, to check the state of recet transcoding jobs, we called:

self._get(
            url=f"{self.api_host}/api/v1/jobs?jobType=video-transcoding&sort=-createdAt&count=100",
            auth=self._auth,
        )

This worked fine.

However I’m trying to introduce remote runners to do the transcoding. Seemingly the remote runner’s jobs complete, however the call above returns with nothing.

I’ve tried to check all the jobs without the jobtype (api/v1/jobs) and saw entries with a totally different type:

{'id': '8090d44e-291d-41ef-baa9-6d1fb4a6ffb3',
   'state': 'completed',
   'type': 'transcoding-job-builder',
   'data': {'videoUUID': '70fcdf73-4dc8-4bdc-b069-06b3f2bcf760',
    'optimizeJob': {'isNewVideo': True}},
   'progress': 0,
   'error': None,
   'createdAt': '2024-09-16T12:34:19.381Z',
   'finishedOn': '2024-09-16T12:34:19.818Z',
   'processedOn': '2024-09-16T12:34:19.699Z'}

These one included video uuids that were transcoded by my remote runner.
Indeed I could fetch them with the jobType=transcoding-job-builder query param.

Checking the OpenApi schema:

The transcoding-job-builder option is not listed at all. Where is this coming from?

Also reading further this one got my attention: vod-web-video-transcoding:

Does this mean to check the states of remote runner transcodings I shall call api/v1/runners/jobs?

Thanks!

Hi,

Remote runner jobs can be found on this endpoint: PeerTube

1 « J'aime »

Thanks for the reply!

Where can I find info about these 8 state values?

:thinking: Sad the openapi renderer doesn’t correctly fill the description. You can find a proper description when you expand the response (state param).

But just in case:

          - `1` Pending
          - `2` Processing
          - `3` Completed
          - `4` Errored
          - `5` Waiting for a parent job
          - `6` Cancelled
          - `7` Parent had an error
          - `8` Parent has been cancelled
1 « J'aime »

Maybe I can’t see the wood for the trees, when I open it I only see:

"state": {
"id": 1,
"label": "Processing"
},

But anyway thanks for the info in the reply, it is what I’ve needed!