Skip to content

Commit

Permalink
run props on init
Browse files Browse the repository at this point in the history
  • Loading branch information
jamiedemaria committed Nov 22, 2023
1 parent e2099c3 commit 3a8e919
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,12 @@ def __init__(self, op_execution_context: OpExecutionContext) -> None:
op_execution_context, "op_execution_context", OpExecutionContext
)

self._run_props = 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,
)

@staticmethod
def get() -> "AssetExecutionContext":
Expand All @@ -1436,13 +1441,6 @@ 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 3a8e919

Please sign in to comment.