16 lines
328 B
Python
16 lines
328 B
Python
from collections.abc import Iterator
|
|
from datetime import date
|
|
|
|
import jobs
|
|
|
|
import dagster as dg
|
|
|
|
|
|
@dg.sensor(job=jobs.raw_html_job)
|
|
def check_update(context: dg.SensorEvaluationContext) -> Iterator[dg.RunRequest]:
|
|
ic(context.cursor)
|
|
|
|
yield dg.RunRequest()
|
|
|
|
context.update_cursor(date.today().strftime("%Y-%m-%d"))
|