Skip to content

Commit

Permalink
Update post review
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed Dec 12, 2024
1 parent b49069f commit 4156025
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from concurrent.futures import ThreadPoolExecutor
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterator, Union

Expand Down Expand Up @@ -133,7 +134,12 @@ def _threadpool_wrap_map_fn() -> Iterator[FivetranEventType]:
)

with ThreadPoolExecutor(
max_workers=DEFAULT_MAX_THREADPOOL_WORKERS,
max_workers=int(
os.getenv(
"FIVETRAN_POSTPROCESSING_THREADPOOL_WORKERS",
default=DEFAULT_MAX_THREADPOOL_WORKERS,
)
),
thread_name_prefix=f"fivetran_{connector_id}",
) as executor:
yield from imap(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ def my_fivetran_assets(context: AssetExecutionContext, fivetran: FivetranWorkspa
assert table_schema_by_asset_key == expected_table_schema_by_asset_key

captured = capsys.readouterr()
# If an exception occurs in fetch_column_metadata,
# a message is logged as a warning and the exception is not raised.
# We test that this message is not in the logs.
assert not re.search(
r"dagster - WARNING - (?s:.)+ - An error occurred while fetching column metadata for table",
captured.err,
Expand Down

0 comments on commit 4156025

Please sign in to comment.