how to send notification email if workflow has problem

Is there a way to send a notification email whenever there are problems with workflow like a fizzled WF?

thanks!

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, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.

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.

···

On Thursday, July 7, 2016 at 12:15:35 PM UTC-5, ajain wrote:

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, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.

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

···

On Thu, Jul 7, 2016 at 2:15 PM, [email protected] wrote:

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.

On Thursday, July 7, 2016 at 12:15:35 PM UTC-5, ajain wrote:

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, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.

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 [email protected].

To post to this group, send email to [email protected].

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/84051755-9720-4f38-905d-1fcf51f13bb5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Thanks, very helpful!!

···

On Thursday, July 7, 2016 at 4:32:06 PM UTC-5, ajain wrote:

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

On Thu, Jul 7, 2016 at 2:15 PM, [email protected] wrote:

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.

On Thursday, July 7, 2016 at 12:15:35 PM UTC-5, ajain wrote:

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, [email protected] 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 [email protected].

To post to this group, send email to [email protected].

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.

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 [email protected].

To post to this group, send email to [email protected].

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/84051755-9720-4f38-905d-1fcf51f13bb5%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.