Skip to content

Commit c47cc7d

Browse files
Merge pull request #259201 from williamzhao87/patch-2
Update router-quickstart-python.md
2 parents 75fba0c + bf64a9a commit c47cc7d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

articles/communication-services/quickstarts/router/includes/router-quickstart-python.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,11 @@ from azure.communication.jobrouter import (
5353
JobRouterAdministrationClient
5454
)
5555
from azure.communication.jobrouter.models import (
56-
DistributionPolicy,
5756
LongestIdleMode,
58-
RouterQueue,
59-
RouterJob,
6057
RouterWorkerSelector,
6158
LabelOperator,
62-
RouterWorker,
63-
RouterChannel
59+
RouterChannel,
60+
CloseJobOptions
6461
)
6562

6663
class RouterQuickstart(object):
@@ -175,7 +172,7 @@ print(f"Worker {worker.id} has completed job {accept.job_id}")
175172
Once the worker is ready to take on new jobs, the worker should close the job. Optionally, the worker can provide a disposition code to indicate the outcome of the job.
176173

177174
```python
178-
router_client.close_job(job_id = job.id, assignment_id = accept.assignment_id, disposition_code = "Resolved")
175+
router_client.close_job(job_id = job.id, assignment_id = accept.assignment_id, options = CloseJobOptions(disposition_code = "Resolved"))
179176
print(f"Worker {worker.id} has closed job {accept.job_id}")
180177
```
181178

0 commit comments

Comments
 (0)