Skip to content

Commit

Permalink
hotfix: asset selection
Browse files Browse the repository at this point in the history
  • Loading branch information
cbini committed Jan 25, 2024
1 parent 4adb71b commit e4e3ab0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/teamster/core/powerschool/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@

def build_powerschool_sensor(
name,
asset_selection: list[AssetsDefinition],
asset_defs: list[AssetsDefinition],
execution_timezone,
minimum_interval_seconds=None,
):
@sensor(
name=name,
minimum_interval_seconds=minimum_interval_seconds,
asset_selection=asset_defs,
asset_selection=asset_selection,
)
def _sensor(
context: SensorEvaluationContext,
Expand Down
3 changes: 2 additions & 1 deletion src/teamster/kippcamden/powerschool/sensors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from teamster.core.powerschool.sensors import build_powerschool_sensor

from .. import CODE_LOCATION, LOCAL_TIMEZONE
from .assets import partition_assets
from .assets import dcid_assets, partition_assets

partition_sensor = build_powerschool_sensor(
name=f"{CODE_LOCATION}_powerschool_partition_sensor",
asset_selection=[*dcid_assets, *partition_assets],
asset_defs=partition_assets,
execution_timezone=LOCAL_TIMEZONE,
minimum_interval_seconds=(60 * 10),
Expand Down
3 changes: 2 additions & 1 deletion src/teamster/kippmiami/powerschool/sensors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from teamster.core.powerschool.sensors import build_powerschool_sensor

from .. import CODE_LOCATION, LOCAL_TIMEZONE
from .assets import partition_assets
from .assets import dcid_assets, partition_assets

partition_sensor = build_powerschool_sensor(
name=f"{CODE_LOCATION}_powerschool_partition_sensor",
asset_selection=[*dcid_assets, *partition_assets],
asset_defs=partition_assets,
execution_timezone=LOCAL_TIMEZONE,
minimum_interval_seconds=(60 * 10),
Expand Down
3 changes: 2 additions & 1 deletion src/teamster/kippnewark/powerschool/sensors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from teamster.core.powerschool.sensors import build_powerschool_sensor

from .. import CODE_LOCATION, LOCAL_TIMEZONE
from .assets import partition_assets
from .assets import dcid_assets, partition_assets

partition_sensor = build_powerschool_sensor(
name=f"{CODE_LOCATION}_powerschool_partition_sensor",
asset_selection=[*dcid_assets, *partition_assets],
asset_defs=partition_assets,
execution_timezone=LOCAL_TIMEZONE,
minimum_interval_seconds=(60 * 10),
Expand Down

0 comments on commit e4e3ab0

Please sign in to comment.