tweaks
This commit is contained in:
@@ -35,7 +35,7 @@ def check_update(context: dg.SensorEvaluationContext) -> Iterator[dg.RunRequest]
|
|||||||
now_str = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
now_str = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
file = f"{now_str} stocks.html"
|
file = f"{now_str} stocks.html"
|
||||||
context.log.info(f"Saving file: {file}")
|
context.log.info(f"Saving file: {file}")
|
||||||
with open(f"/cache/{file}") as fp:
|
with open(f"/cache/{file}", "w") as fp:
|
||||||
fp.write(response.text)
|
fp.write(response.text)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,9 @@ def works(context: dg.AssetExecutionContext) -> Iterator[dg.Output[pl.DataFrame]
|
|||||||
},
|
},
|
||||||
output_required=False,
|
output_required=False,
|
||||||
dagster_type=patito_model_to_dagster_type(Deal),
|
dagster_type=patito_model_to_dagster_type(Deal),
|
||||||
automation_condition=dg.AutomationCondition.eager(),
|
automation_condition=dg.AutomationCondition.on_missing().without(
|
||||||
|
dg.AutomationCondition.in_latest_time_window()
|
||||||
|
),
|
||||||
)
|
)
|
||||||
def new_deals(
|
def new_deals(
|
||||||
context: dg.AssetExecutionContext, partitions: dict[str, pl.LazyFrame | None]
|
context: dg.AssetExecutionContext, partitions: dict[str, pl.LazyFrame | None]
|
||||||
|
|||||||
Reference in New Issue
Block a user