We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee9b106 commit ec3cb64Copy full SHA for ec3cb64
1 file changed
sqlmesh/core/loader.py
@@ -10,6 +10,7 @@
10
from collections import Counter, defaultdict
11
from dataclasses import dataclass
12
from pathlib import Path
13
+import concurrent.futures
14
15
from sqlglot.errors import SqlglotError
16
from sqlglot import exp
@@ -549,9 +550,10 @@ def _load_sql_models(
549
550
max_workers=c.MAX_FORK_WORKERS,
551
) as pool:
552
futures_to_paths = {pool.submit(load_sql_models, path): path for path in paths}
- for fut, path in futures_to_paths.items():
553
+ for future in concurrent.futures.as_completed(futures_to_paths):
554
+ path = futures_to_paths[future]
555
try:
- _, loaded = fut.result()
556
+ _, loaded = future.result()
557
if loaded:
558
for model in loaded:
559
if model.enabled:
0 commit comments