https://dagster.io/ logo
#announcements
Title
# announcements
s

Sasha Gorelikov

03/09/2021, 12:27 PM
Hi! I have such interesting dragster's sensor behavior. If I use function call inside sensor - it doesn't work at all, but if I use lambda - works. Is it an error or it's my error? Thank you
d

daniel

03/09/2021, 1:48 PM
Hi Sasha - it looks like part of sens_func is cut off/collapsed, could you post the rest of it?
It shouldn’t matter if you use a lambda vs a regular function, so something else is probably going on here
s

Sasha Gorelikov

03/09/2021, 2:21 PM
collapsed function - a lot custom actions. Here is a screen. If you need some debug - we can zoom
d

daniel

03/09/2021, 2:40 PM
Looks like it’s a generator which would explain this - try “yield from sens_func(‘smb’)” instead, that will make it iterate through the whole thing and yield runrequests as they are yielded from the function
(That’s for calling a generator function from another generator function in Python, not specific to sensors)
s

Sasha Gorelikov

03/09/2021, 4:24 PM
yes, my mistake. Thanks
dagstir 1