Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion durabletask-azuremanaged/durabletask/azuremanaged/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the MIT License.

from azure.core.credentials import TokenCredential
from typing import Optional

from durabletask.azuremanaged.internal.durabletask_grpc_interceptor import \
DTSDefaultClientInterceptorImpl
Expand All @@ -13,7 +14,7 @@ class DurableTaskSchedulerClient(TaskHubGrpcClient):
def __init__(self, *,
host_address: str,
taskhub: str,
token_credential: TokenCredential,
token_credential: Optional[TokenCredential],
secure_channel: bool = True):

if not taskhub:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Licensed under the MIT License.

import grpc
from typing import Optional

from azure.core.credentials import TokenCredential

from durabletask.azuremanaged.internal.access_token_manager import \
Expand All @@ -15,7 +17,7 @@ class DTSDefaultClientInterceptorImpl (DefaultClientInterceptorImpl):
StreamUnaryClientInterceptor and StreamStreamClientInterceptor from grpc to add an
interceptor to add additional headers to all calls as needed."""

def __init__(self, token_credential: TokenCredential, taskhub_name: str):
def __init__(self, token_credential: Optional[TokenCredential], taskhub_name: str):
self._metadata = [("taskhub", taskhub_name)]
super().__init__(self._metadata)

Expand Down
3 changes: 2 additions & 1 deletion durabletask-azuremanaged/durabletask/azuremanaged/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the MIT License.

from azure.core.credentials import TokenCredential
from typing import Optional

from durabletask.azuremanaged.internal.durabletask_grpc_interceptor import \
DTSDefaultClientInterceptorImpl
Expand All @@ -13,7 +14,7 @@ class DurableTaskSchedulerWorker(TaskHubGrpcWorker):
def __init__(self, *,
host_address: str,
taskhub: str,
token_credential: TokenCredential,
token_credential: Optional[TokenCredential],
secure_channel: bool = True):

if not taskhub:
Expand Down
Loading