how to send notification email if workflow has problem

23 views
Skip to first unread message

ling...@gmail.com

unread,
Jul 7, 2016, 11:39:45 AM7/7/16
to fireworkflows
Is there a way to send a notification email whenever there are problems with workflow like a fizzled WF?

thanks!

Anubhav Jain

unread,
Jul 7, 2016, 1:15:35 PM7/7/16
to ling...@gmail.com, fireworkflows
Hi,

Unfortunately this feature is not implemented. It would be useful, and doesn't seem too difficult (https://docs.python.org/2.7/library/email-examples.html or http://stackoverflow.com/questions/6270782/how-to-send-an-email-with-python), but I never tried to learn how to set up the mail server properly.

Best,
Anubhav

On Thu, Jul 7, 2016 at 8:39 AM, <ling...@gmail.com> wrote:
Is there a way to send a notification email whenever there are problems with workflow like a fizzled WF?

thanks!

--
You received this message because you are subscribed to the Google Groups "fireworkflows" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fireworkflow...@googlegroups.com.
To post to this group, send email to firewo...@googlegroups.com.
Visit this group at https://groups.google.com/group/fireworkflows.
To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/37e50d1d-df6b-44b7-9e54-b25417fb31e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ling...@gmail.com

unread,
Jul 7, 2016, 5:15:34 PM7/7/16
to fireworkflows, ling...@gmail.com
Thanks Aunbhav for quick response. I know how to send eamil, could you point to me in the source code where I can insert send mail method whenever the status is fizzled or with running status but excepiton or errors detected?
thanks.

Anubhav Jain

unread,
Jul 7, 2016, 5:32:06 PM7/7/16
to ling...@gmail.com, fireworkflows
The easiest place to "hack" insert the code is here:

fireworks.core.launchpad.LaunchPad#complete_launch

That method will be called whenever the FireWork is completed, and you can check the state for FIZZLED and do whatever you want when that is the case. Note that this will not work in the "offline" mode of execution, but for standard execution this should work.

If you wanted to do a more proper job, you can look for all the places that complete_launch is called in fireworks.core.rocket.py. Then, either before or after completing the launch, you can send the email. The reason to put it here is that this part of the has access to the FireWork itself. Thus, you can add a proper reserved parameter like "_email_server" within the FireWork and use that to send the email in a more general way (e.g., a way that can work for anyone).

Best,
Anubhav

ling...@gmail.com

unread,
Jul 8, 2016, 12:01:09 PM7/8/16
to fireworkflows, ling...@gmail.com
Thanks, very helpful!!
Reply all
Reply to author
Forward
0 new messages