submit_job_request
- submit_job_request<T = Record<string, any>>(
endpoint: string,
request: string | Record<string, any>,
callback?: GPUdbCallback,
): Promise<T>Parameters
- endpoint: string
The endpoint path, such as
/rebuild_db - request: string | Record<string, any>
The request object, matching the endpoint’s schema; a JSON string is accepted too, as the JavaScript API took one
Optionalcallback: GPUdbCallbackOptional callback function
Returns Promise<T>
Promise resolving to the endpoint’s response
- Defined in src/GPUdb.ts:1880
- endpoint: string
Submits a request to any endpoint as a job:
/create/job, then/get/jobuntil it finishes, whether or not the endpoint is injob_endpoints.For long-running endpoints without a generated method, such as
/rebuild_dbor/admin/rebalance, where holding one HTTP request open for the duration would outlast a proxy. The response is the endpoint’s own, unwrapped from the job. Jobs poll, so the call is always asynchronous, even in the standalone build;job_timeoutbounds it.