Skip to content

Commit

Permalink
test: sensor works for backfill and schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperHG90 committed Mar 2, 2024
1 parent db21f69 commit 56f4d7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from dagster import build_schedule_from_partitioned_job
from dagster import DefaultScheduleStatus, build_schedule_from_partitioned_job
from luchtmeetnet_ingestion.jobs import ingestion_job

daily_schedule = build_schedule_from_partitioned_job(job=ingestion_job, hour_of_day=3)
daily_schedule = build_schedule_from_partitioned_job(
job=ingestion_job, hour_of_day=3, minute_of_hour=0, default_status=DefaultScheduleStatus.RUNNING
)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def slack_message(context: SensorEvaluationContext, **kwargs):
Successful partitions\t\t=>\t{kwargs.get('partitions_successful')}
Failed partitions\t\t\t=>\t{kwargs.get('partitions_failed')}
Upstream partition keys\t\t=>\t{kwargs.get('all_upstream_partitions')[:5]}... (truncated)
Downstream partition key\t=>\t{kwargs.get('downstream_partition_key')}
Downstream partition key\t\t=>\t{kwargs.get('downstream_partition_key')}
Sensor "{context.sensor_name}" triggered downstream job "{kwargs.get('downstream_job_name')}"
with partition key "{kwargs.get('downstream_partition_key')}".
Expand Down

0 comments on commit 56f4d7e

Please sign in to comment.