On this page

Queue-Related SDKs

Updated on 2023-07-19 GMT+08:00

Constraints

Jobs created using the SDK cannot run on the default queue.

Querying All Queues

You can use the API provided by DLI to query the queue list and select the corresponding queue to execute the job. Sample code is as follows:

1
2
3
4
5
6
7
8
9
def list_all_queues(dli_client):
    try:        
       queues = dli_client.list_queues()
    except DliException as e:
        print(e)
        return

    for queue in queues:
        print(queue.name)

For details about the dependencies and complete sample code, see Instructions.

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback