*** ignas has joined #schooltool | 00:34 | |
*** dlobo has quit IRC | 00:39 | |
*** ignas has quit IRC | 00:54 | |
*** dlobo has joined #schooltool | 01:07 | |
*** dlobo has quit IRC | 01:38 | |
*** dlobo has joined #schooltool | 01:40 | |
*** dlobo has quit IRC | 02:21 | |
*** replaceafill has quit IRC | 02:54 | |
*** replaceafill has joined #schooltool | 03:07 | |
*** dlobo has joined #schooltool | 03:13 | |
*** alga has quit IRC | 03:24 | |
*** dlobo has quit IRC | 03:31 | |
*** dlobo has joined #schooltool | 04:02 | |
*** dlobo has quit IRC | 04:39 | |
*** th1a has quit IRC | 04:54 | |
*** dlobo has joined #schooltool | 05:14 | |
*** pcardune has quit IRC | 07:22 | |
*** replaceafill has quit IRC | 08:42 | |
*** pcardune has joined #schooltool | 09:02 | |
*** dlobo has quit IRC | 09:45 | |
*** pcardune has quit IRC | 10:11 | |
*** yvl has joined #schooltool | 10:25 | |
*** pcardune has joined #schooltool | 11:13 | |
*** ignas has joined #schooltool | 11:53 | |
*** Aiste has quit IRC | 12:11 | |
*** krushik has quit IRC | 12:11 | |
*** lisppaste5 has quit IRC | 12:11 | |
*** Lumiere has quit IRC | 12:11 | |
*** Aiste has joined #schooltool | 12:12 | |
*** krushik has joined #schooltool | 12:12 | |
*** lisppaste5 has joined #schooltool | 12:12 | |
*** Lumiere has joined #schooltool | 12:12 | |
*** ignas has quit IRC | 12:45 | |
*** menesis has joined #schooltool | 12:55 | |
*** ignas has joined #schooltool | 13:17 | |
*** Aiste_ has joined #schooltool | 13:19 | |
*** pcardune has quit IRC | 13:19 | |
*** menesis has quit IRC | 13:20 | |
*** Aiste has quit IRC | 13:20 | |
*** menesis has joined #schooltool | 13:20 | |
*** menesis has quit IRC | 13:49 | |
*** alga has joined #SchoolTool | 14:20 | |
*** menesis has joined #schooltool | 14:28 | |
*** menesis has quit IRC | 14:28 | |
*** menesis has joined #schooltool | 14:29 | |
*** th1a has joined #schooltool | 14:33 | |
*** menesis has quit IRC | 14:36 | |
*** replaceafill has joined #schooltool | 15:20 | |
replaceafill | th1a, you around? | 15:27 |
---|---|---|
*** Aiste_ has quit IRC | 16:02 | |
th1a | replaceafill: I am now. | 16:14 |
replaceafill | hey th1a, just sent you an email | 16:14 |
replaceafill | i'm trying to put things in the right place | 16:15 |
th1a | I think zope.sendmail's defaults make sense. | 16:17 |
th1a | er... | 16:18 |
th1a | Well, is there any reason not to require host and port? | 16:19 |
replaceafill | they're optional in the application preferences context | 16:19 |
th1a | Oh, right. | 16:20 |
replaceafill | you can set up the school name without specifying mail stuff for instance | 16:21 |
th1a | Yeah... I think your idea of moving this into a separate form/context is probably right. | 16:21 |
replaceafill | :D | 16:21 |
replaceafill | yay! | 16:21 |
replaceafill | under Manage? | 16:22 |
replaceafill | Email Control? | 16:22 |
th1a | Sure. | 16:22 |
th1a | Um... | 16:23 |
replaceafill | right now, i'm using "Stuck email" for testing :D | 16:23 |
replaceafill | under Manage | 16:23 |
th1a | Outgoing Email | 16:23 |
replaceafill | nice! | 16:23 |
replaceafill | what about the password field? | 16:24 |
replaceafill | it looks kind of strange when you don't see the password displayed | 16:24 |
th1a | The alternative is what, dots? | 16:25 |
replaceafill | I was thinking of something like the "Change Password" button for persons | 16:25 |
replaceafill | i guess the password field doesn't send the password even with "stars" or "dots" in the input because of security reasons | 16:26 |
th1a | Well, use your discretion. | 16:26 |
th1a | It is confusing to make it look like the password isn't set at all. | 16:27 |
yvl | replaceafill, I liked your ideas at the end of the email | 16:27 |
replaceafill | yvl, :D | 16:27 |
yvl | in perfect world, I'd like this email functionality to be a plug-in | 16:28 |
yvl | so, I vote for Manage/Outgoing Email | 16:28 |
yvl | 'schooltool.email' top level container if you need to store some data | 16:29 |
replaceafill | yvl, i was thinking the same, i've initialized the container the same way that is done with the demographics container in basicperson.demographics | 16:29 |
yvl | and src/schooltool/email folder | 16:29 |
replaceafill | yvl, :O | 16:29 |
yvl | cool :) | 16:29 |
replaceafill | yvl, i'd have to move some stuff around, but it's not a big deal :) | 16:30 |
replaceafill | yvl, right now i've put things in the schooltool.app package | 16:30 |
yvl | well, it will be harder to move after release :) | 16:30 |
replaceafill | yvl, definitely! | 16:31 |
replaceafill | yvl, will move it to it's own package then | 16:31 |
yvl | thanks | 16:31 |
yvl | as for the password button, you can cheat a bit: | 16:31 |
yvl | render read-only ***** field manually | 16:31 |
yvl | and name the password field as "change password" | 16:32 |
* replaceafill is processing yvl's idea | 16:32 | |
replaceafill | yvl, ah you mean, change the field's label to "Change password" | 16:33 |
yvl | yes | 16:33 |
yvl | and render a "fake" field "Password: ********" | 16:33 |
replaceafill | just text, right? | 16:33 |
yvl | it's contents: '*'.len(real_password) | 16:33 |
yvl | yes | 16:34 |
replaceafill | very nice, yvl :) | 16:34 |
replaceafill | yvl, question | 16:34 |
yvl | listening | 16:34 |
replaceafill | how do you think is best for the utility to know if it should send emails? | 16:34 |
replaceafill | i mean | 16:34 |
replaceafill | suppose the user doesn't set up the mail fields | 16:35 |
replaceafill | but some client code tries to look up the utility | 16:35 |
replaceafill | mailer = getUtility(...) | 16:35 |
replaceafill | mailer.send(...) | 16:35 |
yvl | hmm | 16:36 |
replaceafill | right now my utility tries to do it based on the "smtpHostname" setting | 16:36 |
replaceafill | if it is set, then it's possible to send the mail | 16:36 |
replaceafill | but it feels fragile | 16:37 |
yvl | yeah | 16:37 |
yvl | hmm | 16:37 |
yvl | maybe add a flag smtp_valid in the utility if its persistent | 16:38 |
yvl | and a method validateSMTP | 16:38 |
yvl | that tries to send the last email from the queue | 16:39 |
yvl | umm, I get the feeling I'll get not clear again | 16:39 |
yvl | basically - depend on ("smptHostName set" & "lastDeliverySucceeded") for now | 16:40 |
replaceafill | lastDeliverySucceeded :O | 16:40 |
yvl | well, mailer should fail if it can't connnect to SMTP server somehow | 16:41 |
yvl | an exception maybe? | 16:41 |
replaceafill | well, the IEmailMessage objects are persistent | 16:41 |
yvl | I don't remember the code :\ | 16:41 |
replaceafill | they store the message and the time they were created | 16:42 |
replaceafill | they're stored in the 'schooltool.email' container | 16:42 |
replaceafill | client code calls the utility | 16:43 |
replaceafill | and uses the .send(...) method | 16:43 |
replaceafill | and the client code doesn't give a damn if the mail was delivered or not | 16:43 |
replaceafill | but the administrator can get to the container | 16:43 |
replaceafill | and see stuck mail | 16:44 |
replaceafill | and there's a "Retry Now" button | 16:44 |
* replaceafill hasn't published his branch cause he knew lots of things would change after this discussion :) | 16:45 | |
yvl | :) | 16:46 |
yvl | who will handle the automatic retries? | 16:47 |
replaceafill | manual retries, the site administrator | 16:47 |
replaceafill | rigth th1a? | 16:47 |
*** dlobo has joined #schooltool | 16:48 | |
th1a | We could add automatic retries later. | 16:48 |
yvl | so the utility is a minimalistic thing that just sends the given IEmailMessage | 16:49 |
replaceafill | :( | 16:49 |
yvl | if fails, it puts it in the container | 16:49 |
yvl | right? | 16:49 |
replaceafill | yes | 16:49 |
replaceafill | the container should be named, "schooltool.failed_emails" :D | 16:49 |
replaceafill | and once they are sent they are deleted, or the site administrator can delete them manually too | 16:50 |
*** alga has quit IRC | 16:51 | |
yvl | how do you do manual re-sending? | 16:51 |
replaceafill | you mean UI? | 16:51 |
yvl | utility.send(app['failed_emails'][0]) ? | 16:51 |
yvl | or .pop() | 16:51 |
replaceafill | traverse the selected ones | 16:52 |
replaceafill | and yes utility.retry(message) | 16:52 |
replaceafill | send was for the first time try | 16:52 |
yvl | why the retry method? | 16:53 |
yvl | maybe utility can figure out if the message is already in the emails container? | 16:54 |
replaceafill | utility.send is supposed to be called by client code | 16:54 |
replaceafill | utility.send(from, to_list, message_as_string) | 16:55 |
replaceafill | if it has no success, it creates the persistent failed message | 16:55 |
yvl | ok | 16:56 |
replaceafill | then, with the "Retry Now" button, i call utility.retry(message) | 16:56 |
replaceafill | message has all the needed information stored | 16:56 |
replaceafill | yvl, thoughts? :) | 16:57 |
yvl | the retry method just looks weird | 16:58 |
yvl | umm, out of place a bit | 16:58 |
yvl | but I get that strange feeling too often ;) | 16:58 |
replaceafill | and you're right sometimes, right? :P | 16:58 |
yvl | ... :) | 16:59 |
replaceafill | well, i think we need two methods, one for the first try and one for the retries | 16:59 |
replaceafill | if the first try succeeds, no message is needed | 16:59 |
replaceafill | do you think a single method would be enough? | 16:59 |
replaceafill | or maybe another approach? | 17:00 |
replaceafill | maybe the client code should be responsible for creating the persistent message before sending it? | 17:00 |
yvl | umm, two methods are ok | 17:00 |
yvl | if you also get a container of util.failed_mesages | 17:01 |
yvl | so you can do stuff like util.failed_messages.keys() | 17:01 |
yvl | failed_ids = [id for id in util.failed_messages.keys()] | 17:01 |
yvl | and then | 17:02 |
yvl | for id in failed_ids: | 17:02 |
yvl | util.retry(id) | 17:02 |
yvl | and util would handle deleting form container on success | 17:02 |
yvl | and you can call failed_messages "queue" | 17:02 |
yvl | an OrderedContainer could be useful maybe | 17:03 |
replaceafill | FIFO? | 17:03 |
yvl | something along the lines | 17:04 |
replaceafill | how would client code get to the sending functionality? | 17:04 |
replaceafill | i mean first time | 17:05 |
yvl | same as before | 17:05 |
replaceafill | ah ok | 17:05 |
yvl | .send(X, Y, Z) | 17:05 |
yvl | but util would be also responsible for managing the message queue | 17:05 |
replaceafill | yvl last thing on my mind | 17:06 |
replaceafill | performance :) | 17:06 |
replaceafill | i know "first do it, then do it right, then do it fast" :) | 17:06 |
replaceafill | but, supposed the user selects 100 failed emails | 17:07 |
replaceafill | the sending could block the process, right? | 17:07 |
yvl | well yes | 17:07 |
replaceafill | zope.sendmail uses threads for that | 17:07 |
yvl | we can change util.retry(id) to just mark messages for retrying | 17:08 |
yvl | later | 17:08 |
replaceafill | and what about the "Now" part in the "Retry Now" button :) | 17:08 |
yvl | and some cron job or something will use sane amount of messages at a time | 17:08 |
yvl | For now, its "Retry Now" | 17:09 |
replaceafill | ah ok | 17:09 |
yvl | later, well... | 17:09 |
yvl | some of the messages will have "RETRYING..." | 17:09 |
ignas | emm, really block? | 17:09 |
ignas | I would assume that retry | 17:09 |
ignas | just queues up the messages | 17:09 |
ignas | not actually sends them | 17:09 |
yvl | for now, it sends them | 17:09 |
ignas | sending 100 messages does not block, because sending is done in background, retry does not block because ... ;) | 17:10 |
yvl | we'll do the sending in the background "real soon now" ;) | 17:10 |
yvl | replaceafill, you were right to bring this up | 17:11 |
replaceafill | yvl, yes i knew at some point i had to ask you this :) | 17:11 |
*** dlobo has quit IRC | 17:13 | |
yvl | so, for now do the straightforward version | 17:13 |
yvl | and I'll try not to block you too much | 17:13 |
yvl | and add cron job functionallity in schooltool, well, soonish :) | 17:14 |
replaceafill | yvl, i'll move the code to its right place and will show it to you | 17:14 |
replaceafill | thanks yvl, th1a, ignas :) | 17:15 |
th1a | yvl: Just for future reference, are you ok with traveling to, say, Cambodia or Bangaladesh? | 17:18 |
yvl | sure, th1a | 17:24 |
th1a | Just checking. | 17:24 |
*** menesis has joined #schooltool | 17:27 | |
*** dlobo has joined #schooltool | 17:36 | |
*** dlobo has quit IRC | 17:39 | |
*** aelkner has quit IRC | 18:14 | |
*** aelkner has joined #schooltool | 18:14 | |
*** ignas has quit IRC | 18:38 | |
*** replaceafill has quit IRC | 18:44 | |
*** alga has joined #SchoolTool | 19:01 | |
*** dlobo has joined #schooltool | 19:03 | |
*** krushik has quit IRC | 19:11 | |
*** krushik has joined #schooltool | 19:11 | |
*** menesis has quit IRC | 20:03 | |
*** menesis has joined #schooltool | 20:03 | |
*** menesis has quit IRC | 20:03 | |
*** menesis has joined #schooltool | 20:03 | |
*** krushik has quit IRC | 20:32 | |
*** krushik has joined #schooltool | 20:40 | |
*** pcardune has joined #schooltool | 20:42 | |
*** pcardune has quit IRC | 21:54 | |
*** pcardune has joined #schooltool | 22:44 | |
*** dlobo has quit IRC | 22:58 | |
*** jelkner has joined #schooltool | 23:17 | |
*** dlobo has joined #schooltool | 23:24 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!