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
b802da13
Commit
b802da13
authored
Dec 06, 2022
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pager init changed
parent
e54c6a24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
cosmos_client.py
utils/cosmos_client.py
+13
-10
No files found.
utils/cosmos_client.py
View file @
b802da13
...
...
@@ -124,6 +124,7 @@ class CosmosClient:
""" Potential blocking code """
# noinspection SqlDialectInspection,SqlNoDataSourceInspection
items
=
[]
continuation_token
=
None
Log
.
d
(
TAG
,
"get_initiation_items:: init query"
)
query_iterable
=
container
.
query_items
(
query
=
"SELECT * FROM r "
...
...
@@ -136,18 +137,20 @@ class CosmosClient:
max_item_count
=
1
)
Log
.
d
(
TAG
,
"get_initiation_items:: getting pager"
)
pager
=
query_iterable
.
by_page
(
token
)
Log
.
d
(
TAG
,
"get_initiation_items:: getting page items"
)
# current_page = list(pager.next())[0]
pager_next
=
pager
.
next
()
Log
.
d
(
TAG
,
"get_initiation_items:: pager_next: "
"{}"
.
format
(
pager_next
))
Log
.
d
(
TAG
,
"get_initiation_items:: appending items"
)
# items.append(current_page)
Log
.
d
(
TAG
,
"get_initiation_items:: returning Initiations"
)
if
token
is
not
None
:
pager
=
query_iterable
.
by_page
(
token
)
else
:
pager
=
query_iterable
.
by_page
()
Log
.
d
(
TAG
,
"get_initiation_items:: getting items"
)
new_items
=
list
(
pager
.
next
())[
0
]
Log
.
d
(
TAG
,
"get_initiation_items:: adding items"
)
items
.
append
(
new_items
)
Log
.
d
(
TAG
,
"get_initiation_items:: getting token"
)
continuation_token
=
pager
.
continuation_token
return
(
Initiation
.
get_schema
(
unknown
=
EXCLUDE
)
.
load
(
items
,
many
=
True
),
pager
.
continuation_token
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