@@ -436,6 +436,7 @@ class CompileArgs:
436
436
models : List [str ]
437
437
exclude : Tuple [str ]
438
438
state : Optional [Path ]
439
+ defer_state : Optional [Path ]
439
440
single_threaded : Optional [bool ]
440
441
441
442
@@ -453,6 +454,7 @@ def __init__(
453
454
selector : Optional [str ] = None ,
454
455
threads : Optional [int ] = None ,
455
456
state : Optional [str ] = None ,
457
+ defer_state : Optional [str ] = None ,
456
458
profile_target : Optional [str ] = None ,
457
459
args_vars : str = "{}" ,
458
460
generated_models : Dict [str , Path ] = {},
@@ -485,9 +487,13 @@ def __init__(
485
487
self .profiles_dir = flags .PROFILES_DIR
486
488
487
489
self ._state = None
490
+ self ._defer_state = None
488
491
if state is not None :
489
492
self ._state = Path (os .path .realpath (os .path .expanduser (state )))
490
493
494
+ if defer_state is not None :
495
+ self ._defer_state = Path (os .path .realpath (os .path .expanduser (defer_state )))
496
+
491
497
self .scripts_dir = parse .get_scripts_dir (self .project_dir , args_vars )
492
498
493
499
@@ -525,7 +531,7 @@ def __init__(
525
531
# Necessary for manifest loading to not fail
526
532
# dbt.tracking.initialize_tracking(self.profiles_dir)
527
533
528
- args = CompileArgs (selector , select , select , exclude , self ._state , None )
534
+ args = CompileArgs (selector , select , select , exclude , self ._state , self . _defer_state , None )
529
535
self ._compile_task = CompileTask (args , self ._config , native_manifest )
530
536
531
537
self ._compile_task ._runtime_initialize ()
0 commit comments