geodesymiami / rsmas_insar

RSMAS InSAR code
https://rsmas-insar.readthedocs.io/
GNU General Public License v3.0
59 stars 23 forks source link

Email notification on pegasus and other platforms refactor #119

Closed falkamelung closed 3 years ago

falkamelung commented 5 years ago

Here what FA plans to improve emailing:

Questions:

Could be useful: https://realpython.com/courses/sending-emails-python/

Ovec8hkin commented 5 years ago

Lets think carefully about this and do it right. Im sure there are some good python modules for sending emails, and I think it would be better to use those rather than shooting off mail commands like we do now. How high priority is this?

falkamelung commented 5 years ago

Thank you. I may do it as early as later this week if it turns out that we need it. But I would do a quick-and-dirty job so that it can be refactored. This could be something for Alex to start with.


Falk Amelung Professor Department of Marine Geosciences Rosenstiel School of Marine and Atmospheric Sciences University of Miami 4600 Rickenbacker Causeway Miami, FL 33149 USA Tel: 305 421 4949 E-mail: famelung@rsmas.miami.edumailto:famelung@rsmas.miami.edu Web: http://insar.rsmas.miami.edu InSAR data: http://insarmaps.miami.edu

On Apr 15, 2019, at 10:23 PM, Joshua Zahner notifications@github.com<mailto:notifications@github.com> wrote:

Lets think carefully about this and do it right. Im sure there are some good python modules for sending emails, and I think it would be better to use those rather than shooting off mail commands like we do now. How high priority is this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fgeodesymiami%2Frsmas_insar%2Fissues%2F119%23issuecomment-483486132&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7C55c4f8b955f04330a95c08d6c2128add%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636909782224728749&sdata=3slplQmuLxe9O5rf5c3aEyIrreBEF9ECsj%2Bre%2FTa7QQ%3D&reserved=0, or mute the threadhttps://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKpT3KCpEm_G1tAAfIlxZ3sE8sTEFSC8ks5vhTQrgaJpZM4cwFzp&data=02%7C01%7Cfamelung%40rsmas.miami.edu%7C55c4f8b955f04330a95c08d6c2128add%7C2a144b72f23942d48c0e6f0f17c48e33%7C0%7C0%7C636909782224738753&sdata=SEoA8yS4BxcoOAQG%2FFyAVuk1LOCb4AtGNenWQVhaKx4%3D&reserved=0.

gravelcycles commented 5 years ago

What are the other ways we could do this? I'm doing this as a way around jumping to the first idea we come up with and going with that. (Idea shamelessly stolen from Philosophy of Software Design). So let's not reject or accept ideas based on first glance but think about their value.

One way I can think of: Why not have SCHEDULER = {'LSF', 'PBS', 'NOSCHEDULER'} and HOST = {'PEGASUS-LOGIN', 'PEGASUS-COMPUTE', 'JETSTREAM', 'AWS-EC2'} variables and then based on those, we can have a mail function that uses the HOST variable to determine how to send the email.

gravelcycles commented 5 years ago

I'm okay with using the Linux mail command as it should be pretty consistent. But, as you know, I'm totally okay with using a Python module for this, as long as it's well documented, supported, and in active use/development.

falkamelung commented 5 years ago

Unfortunately, on pegasus mail is very unreliable. Sometime messages never arrive, sometime they arrive weeks later. Yeah, it would be good to have one *defaults file for HOST-dependent variables and one for JOBQUEUE-related variables