Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add session_id onto message, and autorenewer class. #8

Merged
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
11 changes: 10 additions & 1 deletion sdk/servicebus/azure-servicebus/api_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,15 @@ def expired(self) -> bool:


class Message:
def __init__(self, body : str, encoding : str = 'UTF-8', **kwargs) -> None:
def __init__(self, body : str, encoding : str = 'UTF-8', session_id : str = None, **kwargs) -> None:
def __str__(self):

# @properties
def body(self) -> Union[bytes, Generator[bytes]]: # read-only
def partition_key(self, value : str):
def partition_key(self) -> str:
def session_id(self, value : str):
def session_id(self) -> str:
def via_partition_key(self, value: str):
def via_partition_key(self) -> str:
def time_to_live(self, value : Union[float, timedelta]):
Expand Down Expand Up @@ -204,3 +206,10 @@ class TransportType(Enum):
class ServiceBusSharedKeyCredential:
def __init__(self, policy, key):
def get_token(self, *scopes, **kwargs):


class AutoLockRenew:
def __init__(self, executor=None, max_workers=None):
def __enter__(self):
def __exit__(self, *args):
def register(self, renewable, timeout=300):