Skip to content

Commit 946de3e

Browse files
authored
Add options for the Long Running Operation. (#1072)
## 🥞 Stacked PR Use this [link](https://github.com/databricks/databricks-sdk-py/pull/1072/files) to review incremental changes. - [**stack/add-lro-option**](#1072) [[Files changed](https://github.com/databricks/databricks-sdk-py/pull/1072/files)] --------- ## What changes are proposed in this pull request? This PR adds the options for the Long Running Operation. Currently, it only has a timeout option similar to other SDKs, but it can be extended in the future. ## How is this tested? N/A NO_CHANGELOG=true
1 parent 161c30a commit 946de3e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

databricks/sdk/common/lro.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from datetime import timedelta
2+
from typing import Optional
3+
4+
5+
class LroOptions:
6+
"""LroOptions is the options for the Long Running Operations.
7+
DO NOT USE THIS OPTION. This option is still under development
8+
and can be updated in the future without notice.
9+
"""
10+
11+
def __init__(self, *, timeout: Optional[timedelta] = None):
12+
"""
13+
Args:
14+
timeout: The timeout for the Long Running Operations.
15+
If not set, the default timeout is 20 minutes.
16+
"""
17+
self.timeout = timeout or timedelta(minutes=20)

0 commit comments

Comments
 (0)