Skip to content

Commit

Permalink
start run_props as None
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 17, 2023
1 parent 36d3f15 commit 815d4e3
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1421,12 +1421,7 @@ def __init__(self, op_execution_context: OpExecutionContext) -> None:
op_execution_context, "op_execution_context", OpExecutionContext
)

self._run_props = RunProperties(
run_id=self._op_execution_context.run_id,
run_config=self._op_execution_context.run_config,
dagster_run=self._op_execution_context.run,
retry_number=self._op_execution_context.retry_number,
)
self._run_props = None

@staticmethod
def get() -> "AssetExecutionContext":
Expand All @@ -1441,6 +1436,13 @@ def op_execution_context(self) -> OpExecutionContext:

@property
def run_properties(self) -> RunProperties:
if self._run_props is None:
self._run_props = RunProperties(
run_id=self._op_execution_context.run_id,
run_config=self._op_execution_context.run_config,
dagster_run=self._op_execution_context.run,
retry_number=self._op_execution_context.retry_number,
)
return self._run_props

######## Deprecated methods
Expand Down

0 comments on commit 815d4e3

Please sign in to comment.