-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Outline a callback pattern for implementing long poll methods #19
Comments
See #18 comment on streaming message now that we have moved to |
Given we are using async functions, we should just stick with using |
While building the It's worth noting the def get_data( # pylint: disable=too-many-locals
self,
bounds: Dict[str, Filter],
order: List[Tuple[str, RequestedOrder]],
**kwargs: Any,
) -> Iterator[Row]:
yield {
"rowid": 1,
"id": 1,
"authorised": True,
"first_name": "Dev",
"last_name": "Mukherjee",
} |
first commit towards implementing a polling mechanism with an example implementation of how to use it, this is completely volatile so don't use until this is merged in with master refs #19
does not use the wrapper methods just yet but proves the point that it works with the concept of sending out partial response pasrsing and following the next url refs #19
initially thought of passing in a control mechanism and settled for using asyncio events to keep this clean, this should allow for user initiated controls to break the loop and in case of unit tests we can run a loop for x times and break refs #19
Various entities provide a long poll mechanism to get changes as they occur on the server (I assume this is due to the lack of webhooks, which would be difficult to proxy in the current environment, and for clients like what we are building long poll would make sense in certain use cases).
The endpoints generally seem to return a response if there are any, otherwise return a
400
and hang up.This ticket is to study these endpoints like
cardholder
,alarms
, etc and determine a pattern so all of them can follow the same design principles.The text was updated successfully, but these errors were encountered: