We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 993c3b8 commit 93ae8aaCopy full SHA for 93ae8aa
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
@@ -535,9 +536,10 @@ def _load_sql_models(
535
536
max_workers=c.MAX_FORK_WORKERS,
537
) as pool:
538
futures_to_paths = {pool.submit(load_sql_models, path): path for path in paths}
- for fut, path in futures_to_paths.items():
539
+ for future in concurrent.futures.as_completed(futures_to_paths):
540
+ path = futures_to_paths[future]
541
try:
- _, loaded = fut.result()
542
+ _, loaded = future.result()
543
if loaded:
544
for model in loaded:
545
if model.enabled:
0 commit comments