Bob Gobeille wrote: > On Feb 2, 2009, at 11:23 AM, Donohoe, Mark wrote: >> The first draft of the email notification design is ready for review. >> Please review and provide feedback. You can find it at: >> >> http://fossology.org/email-design > > > If you run e-mail notification as an agent, presumably it will have a > dependency on another agent (the one you want to be notified about). > Is that right? If so, what if the other agent fails? In this case, > dependent jobs are not run. Ugg, good catch, this is a design flaw, will try to address it. The issue is that the scheduler only knows what's next, not when a job (in total) is done. So there is no way today, for the scheduler to indicate when all of the processing is done for a particular upload. Some items are set in the jobqueue table, jq_endtime and setting the jq_end_bits. So the Email agent could check those.
This agent is uncovering issues with how FOSSology deals with failed jobs. > > The users table does have an email address but that doesn't mean that > email notification is desired. So are you saying that you will add a > field to indicate if email notifications should be sent by default > (but potentially overridden during upload time)? Yes, I would add a checkbox for email notification and and area to list other e-mail addresses that want to be notified by email. > > You say to enhance user pages to include and optional list of email > addresses. How is that different from the email field that is there > now? I think the email address in the users table can contain comma > separated addresses. Is this correct? Yes, this is correct, you can list multiple address (comma separated) in the user email field. I think of it this way, I have two address for my user email, and I want to include folks I'm working with in jobs that I process. I'll turn on email notification and include those 'other' email address in the additional email addresses specified in the email notification area field. I'll IRC you with a link to a prototype user page I have mocked up. > > > If someone uploads for license analysis + pkgmetagetta + specagent + > ... Those run as multiple jobs. Are you going to send multiple emails? No, I would not send separate emails. The idea was when they are all done, the last job is email to send the notification email. The issue here is that on failure, this will also fail as you pointed out earlier. I'm thinking this might work. The email agent is scheduled with two parameters, the jq_pk and the string which is the message to send. Using the jq_pk, the agent can look up the jq_endtime and jq_end_bits to determine the status of the job (success or fail). Bob, jq_end_bits also contains nonfatal=0x4 in addition to ok and fail. Do you know if we use this and what it means? > > You don't say what content is in the email. It seems there should be > success or error message + enough to identify to the user what file > and job is being referred to. Good point, I'll include a sample in the next draft. > > What tests are you including? Huh? I'm not sure what you are asking. I plan to write tests for this agent/function. Plus, all of the user pages need tests written for them. Either Mary or I can code those. > > Can other users subscribe to an upload so they are notified on any new > analysis? Is there any user desire for this? > I actually don't think this is a good idea even if users wanted it. I don't think this is a good idea as it is intrusive. Maybe I'm analyzing something that is sensitive and few folks are supposed to know about it. Why should any user that has a login to FOSSology be allowed to sign up to see the results? I could see signing up being OK, if we had a concept of 'Groups' or something like that, but we don't. So for now, I'm not inclined to look into this. Thanks for the great feedback. -- Mark Donohoe ALPS/OSTT, Cupertino CA. fossology.org _______________________________________________ fossology mailing list [email protected] http://fossology.org/mailman/listinfo/fossology

