fix(ingest/okta): fix event_loop RuntimeError with nested asyncio (#8637)

This commit is contained in:
skrydal 2023-08-16 07:02:57 +02:00 committed by GitHub
parent 526e626146
commit baae3d261d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -358,7 +358,7 @@ plugins: Dict[str, Set[str]] = {
"mysql": mysql,
# mariadb should have same dependency as mysql
"mariadb": sql_common | {"pymysql>=1.0.2"},
"okta": {"okta~=1.7.0"},
"okta": {"okta~=1.7.0", "nest-asyncio"},
"oracle": sql_common | {"cx_Oracle"},
"postgres": sql_common | {"psycopg2-binary", "GeoAlchemy2"},
"presto": sql_common | pyhive_common | trino,

View File

@ -7,6 +7,7 @@ from dataclasses import dataclass, field
from time import sleep
from typing import Dict, Iterable, List, Optional, Union
import nest_asyncio
from okta.client import Client as OktaClient
from okta.exceptions import OktaAPIException
from okta.models import Group, GroupProfile, User, UserProfile, UserStatus
@ -51,6 +52,7 @@ from datahub.metadata.schema_classes import (
)
logger = logging.getLogger(__name__)
nest_asyncio.apply()
class OktaConfig(StatefulIngestionConfigBase, ConfigModel):