Skip to content

Commit

Permalink
Fix math_sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
dpeng817 committed Nov 13, 2023
1 parent aef3b6a commit 7a3ca07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python_modules/dagster-test/dagster_test/toys/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ def toy_asset_sensor(context, asset_event):

@sensor(job=simple_config_job)
def math_sensor(context):
context.update_cursor(str(int(context.cursor) + 1))
cursor = context.cursor if context.cursor else 0
context.update_cursor(str(int(cursor) + 1))
for i in range(3):
yield RunRequest(
run_key=str(i),
run_config={"ops": {"the_op": {"config": {"foo": "bar"}}}},
run_config={"ops": {"requires_config": {"config": {"num": 0}}}},
tags={"fee": "fifofum"},
)

Expand Down

0 comments on commit 7a3ca07

Please sign in to comment.