-
Notifications
You must be signed in to change notification settings - Fork 68
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
Enable servicebus batch trigger (cardinality=many) #73
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes. LGTM.
cls, datetime_str: Optional[str]) -> Optional[datetime.datetime]: | ||
|
||
if datetime_str is None or datetime_str == '': | ||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simplify this by just doing
if not datetime_str
Empty string
>>> x = ''
>>> if x:
... print ("Yes")
... else:
... print("no")
...
no
A None
object
>>> z = None
>>> if z:
... print("Yes")
... else:
... print("No")
...
No
String with a value
>>> y = 'Yo'
>>> if y:
... print ("Yes")
... else:
... print("no")
...
Yes
def reply_to_session_id(self) -> typing.Optional[str]: | ||
"""A session identifier augmenting the reply_to address.""" | ||
def scheduled_enqueue_time(self) -> Optional[datetime.datetime]: | ||
"""(Deprecated, use scheduled_enqueue_time_utc instead)""" | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think of a way to inform users through the logs (mainly for the in the runtime).
Has anyone got this working? I am trying to use it with Service bus triggered azure function (python) and even after adding changes suggested above - the function is not honoring batching and is getting executed every time new message appears on the service bus queue here is my sample function app code
and here is function.json
apart from that, here is host.json
is this something yet to hit GA? |
@app.service_bus_queue_trigger(
arg_name="input", queue_name="my-queue", connection="AzureServiceBus", cardinality="many"
)
def create(input: List[func.ServiceBusMessage]):
... |
Fixes
Fixes: #66
Description
Todo
Usage
functions.json
__init__.py