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
59e3c40c
Commit
59e3c40c
authored
Aug 26, 2022
by
Oleksandr Barabash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverted back to ManagedIdentityCredential
parent
c1a5cf64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
cosmos_client.py
utils/cosmos_client.py
+2
-2
No files found.
utils/cosmos_client.py
View file @
59e3c40c
...
...
@@ -6,7 +6,7 @@ from typing import Any, Dict, Optional, Union, List
import
azure.cosmos.cosmos_client
as
cosmos_client
import
azure.cosmos.exceptions
as
exceptions
from
azure.cosmos
import
DatabaseProxy
,
ContainerProxy
from
azure.cosmos
import
DatabaseProxy
,
ContainerProxy
,
documents
from
azure.identity
import
ManagedIdentityCredential
,
DefaultAzureCredential
from
botbuilder.core
import
TurnContext
from
botbuilder.schema
import
ChannelAccount
...
...
@@ -50,7 +50,7 @@ class CosmosClient:
""" Cosmos Client class """
def
__init__
(
self
,
host
:
str
,
master_key
:
str
):
self
.
executor
=
futures
.
ThreadPoolExecutor
()
mgmt_credentials
=
DefaultAzure
Credential
()
mgmt_credentials
=
ManagedIdentity
Credential
()
self
.
client
=
cosmos_client
.
CosmosClient
(
host
,
mgmt_credentials
)
# self.client = cosmos_client.CosmosClient(host,
# dict(masterKey=master_key))
...
...
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