Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cake-bot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Oleksandr Barabash
cake-bot
Commits
a12d0910
Commit
a12d0910
authored
Dec 06, 2022
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_next_page_bl additional loggings added doe to shitty microsoft examples
parent
1b80a6c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
cosmos_client.py
utils/cosmos_client.py
+7
-5
No files found.
utils/cosmos_client.py
View file @
a12d0910
...
...
@@ -120,11 +120,14 @@ class CosmosClient:
""" Get Next page items Blocking """
try
:
# todo(s1z): why do we get [0], as MS does? This is bad!!!
return
list
(
pager
.
next
())[
0
]
next_page
=
pager
.
next
()
Log
.
d
(
TAG
,
f
"get_next_page_bl::next_page:{next_page},"
f
"list({list(next_page)})"
)
return
list
(
next_page
)[
0
]
except
StopIteration
:
Log
.
e
(
TAG
,
"get_next_page_bl:: no items found, returning '[]'"
,
exc_info
=
sys
.
exc_info
())
return
[]
return
list
()
async
def
get_initiation_items
(
self
,
notification_id
,
token
=
None
)
->
Tuple
[
List
[
Initiation
],
str
]:
...
...
@@ -147,11 +150,10 @@ class CosmosClient:
)
pager
=
query_iterable
.
by_page
(
token
)
items
=
self
.
get_next_page_bl
(
pager
)
continuation_token
=
pager
.
continuation_token
Log
.
d
(
TAG
,
f
"get_initiation_items::items: {items}"
)
return
(
Initiation
.
get_schema
(
unknown
=
EXCLUDE
)
.
load
(
items
,
many
=
True
),
continuation_token
pager
.
continuation_token
)
return
await
self
.
execute_blocking
(
bl
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment