Umar Hussain
02/01/2023, 12:32 AMdagster-slack
integration?
i.e I have a ~30s sensor that looks for new files in a google drive - when found I'd like to send an alert with some metadata from that sensor before it kicks off a job:
I guess another method could be to create an @op
and add that to my define_asset_job
selection? (see pic below)
@sensor(job=cool_job, , minimum_interval_seconds=30):
def check_for_new_files(context):
metadata = cool_assets.getmetadata()
if metadata['new_files'] == True:
#post message here if possible:
thanks!Zach P
02/01/2023, 2:18 AMUmar Hussain
02/01/2023, 12:49 PMgetmetdata()
function twice to grab the same data as it's not passed via the sensor to an OP. Not a major issue but thought I could do it from the sensor 🙂 thanks mateZach P
02/01/2023, 2:10 PMZach P
02/01/2023, 2:11 PMjamie
02/01/2023, 4:30 PMslack_on_failure
sensor you should be able to copy a lot of the code we have in this file for formatting your messages and stuff!Umar Hussain
02/01/2023, 6:49 PM