File tree 3 files changed +7
-3
lines changed
durabletask-azuremanaged/durabletask/azuremanaged
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 2
2
# Licensed under the MIT License.
3
3
4
4
from azure .core .credentials import TokenCredential
5
+ from typing import Optional
5
6
6
7
from durabletask .azuremanaged .internal .durabletask_grpc_interceptor import \
7
8
DTSDefaultClientInterceptorImpl
@@ -13,7 +14,7 @@ class DurableTaskSchedulerClient(TaskHubGrpcClient):
13
14
def __init__ (self , * ,
14
15
host_address : str ,
15
16
taskhub : str ,
16
- token_credential : TokenCredential ,
17
+ token_credential : Optional [ TokenCredential ] ,
17
18
secure_channel : bool = True ):
18
19
19
20
if not taskhub :
Original file line number Diff line number Diff line change 2
2
# Licensed under the MIT License.
3
3
4
4
import grpc
5
+ from typing import Optional
6
+
5
7
from azure .core .credentials import TokenCredential
6
8
7
9
from durabletask .azuremanaged .internal .access_token_manager import \
@@ -15,7 +17,7 @@ class DTSDefaultClientInterceptorImpl (DefaultClientInterceptorImpl):
15
17
StreamUnaryClientInterceptor and StreamStreamClientInterceptor from grpc to add an
16
18
interceptor to add additional headers to all calls as needed."""
17
19
18
- def __init__ (self , token_credential : TokenCredential , taskhub_name : str ):
20
+ def __init__ (self , token_credential : Optional [ TokenCredential ] , taskhub_name : str ):
19
21
self ._metadata = [("taskhub" , taskhub_name )]
20
22
super ().__init__ (self ._metadata )
21
23
Original file line number Diff line number Diff line change 2
2
# Licensed under the MIT License.
3
3
4
4
from azure .core .credentials import TokenCredential
5
+ from typing import Optional
5
6
6
7
from durabletask .azuremanaged .internal .durabletask_grpc_interceptor import \
7
8
DTSDefaultClientInterceptorImpl
@@ -13,7 +14,7 @@ class DurableTaskSchedulerWorker(TaskHubGrpcWorker):
13
14
def __init__ (self , * ,
14
15
host_address : str ,
15
16
taskhub : str ,
16
- token_credential : TokenCredential ,
17
+ token_credential : Optional [ TokenCredential ] ,
17
18
secure_channel : bool = True ):
18
19
19
20
if not taskhub :
You can’t perform that action at this time.
0 commit comments