Skip to content

Commit

Permalink
add new mode
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop committed May 17, 2024
1 parent 341803d commit 36d4f99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/dbt/cli/requires.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,16 @@ def setup_record_replay():
recorder = Recorder(RecorderMode.REPLAY, recording_path)
elif rec_mode == RecorderMode.RECORD:
recorder = Recorder(RecorderMode.RECORD)
elif rec_mode == RecorderMode.RECORD_QUERIES:
recorder = Recorder(RecorderMode.RECORD_QUERIES)

get_invocation_context().recorder = recorder


def tear_down_record_replay():
recorder = get_invocation_context().recorder
if recorder is not None:
if recorder.mode == RecorderMode.RECORD:
if recorder.mode == RecorderMode.RECORD or recorder.mode == RecorderMode.RECORD_QUERIES:
recorder.write("recording.json")
elif recorder.mode == RecorderMode.REPLAY:
recorder.write_diffs("replay_diffs.json")
Expand Down

0 comments on commit 36d4f99

Please sign in to comment.