IRC log of #schooltool for Tuesday, 2009-10-06

*** ignas has joined #schooltool00:34
*** dlobo has quit IRC00:39
*** ignas has quit IRC00:54
*** dlobo has joined #schooltool01:07
*** dlobo has quit IRC01:38
*** dlobo has joined #schooltool01:40
*** dlobo has quit IRC02:21
*** replaceafill has quit IRC02:54
*** replaceafill has joined #schooltool03:07
*** dlobo has joined #schooltool03:13
*** alga has quit IRC03:24
*** dlobo has quit IRC03:31
*** dlobo has joined #schooltool04:02
*** dlobo has quit IRC04:39
*** th1a has quit IRC04:54
*** dlobo has joined #schooltool05:14
*** pcardune has quit IRC07:22
*** replaceafill has quit IRC08:42
*** pcardune has joined #schooltool09:02
*** dlobo has quit IRC09:45
*** pcardune has quit IRC10:11
*** yvl has joined #schooltool10:25
*** pcardune has joined #schooltool11:13
*** ignas has joined #schooltool11:53
*** Aiste has quit IRC12:11
*** krushik has quit IRC12:11
*** lisppaste5 has quit IRC12:11
*** Lumiere has quit IRC12:11
*** Aiste has joined #schooltool12:12
*** krushik has joined #schooltool12:12
*** lisppaste5 has joined #schooltool12:12
*** Lumiere has joined #schooltool12:12
*** ignas has quit IRC12:45
*** menesis has joined #schooltool12:55
*** ignas has joined #schooltool13:17
*** Aiste_ has joined #schooltool13:19
*** pcardune has quit IRC13:19
*** menesis has quit IRC13:20
*** Aiste has quit IRC13:20
*** menesis has joined #schooltool13:20
*** menesis has quit IRC13:49
*** alga has joined #SchoolTool14:20
*** menesis has joined #schooltool14:28
*** menesis has quit IRC14:28
*** menesis has joined #schooltool14:29
*** th1a has joined #schooltool14:33
*** menesis has quit IRC14:36
*** replaceafill has joined #schooltool15:20
replaceafillth1a, you around?15:27
*** Aiste_ has quit IRC16:02
th1areplaceafill: I am now.16:14
replaceafillhey th1a, just sent you an email16:14
replaceafilli'm trying to put things in the right place16:15
th1aI think zope.sendmail's defaults make sense.16:17
th1aer...16:18
th1aWell, is there any reason not to require host and port?16:19
replaceafillthey're optional in the application preferences context16:19
th1aOh, right.16:20
replaceafillyou can set up the school name without specifying mail stuff for instance16:21
th1aYeah... I think your idea of moving this into a separate form/context is probably right.16:21
replaceafill:D16:21
replaceafillyay!16:21
replaceafillunder Manage?16:22
replaceafillEmail Control?16:22
th1aSure.16:22
th1aUm...16:23
replaceafillright now, i'm using "Stuck email" for testing :D16:23
replaceafillunder Manage16:23
th1aOutgoing Email16:23
replaceafillnice!16:23
replaceafillwhat about the password field?16:24
replaceafillit looks kind of strange when you don't see the password displayed16:24
th1aThe alternative is what, dots?16:25
replaceafillI was thinking of something like the "Change Password" button for persons16:25
replaceafilli guess the password field doesn't send the password even with "stars" or "dots" in the input because of security reasons16:26
th1aWell, use your discretion.16:26
th1aIt is confusing to make it look like the password isn't set at all.16:27
yvlreplaceafill, I liked your ideas at the end of the email16:27
replaceafillyvl, :D16:27
yvlin perfect world, I'd like this email functionality to be a plug-in16:28
yvlso, I vote for Manage/Outgoing Email16:28
yvl'schooltool.email' top level container if you need to store some data16:29
replaceafillyvl, i was thinking the same, i've initialized the container the same way that is done with the demographics container in basicperson.demographics16:29
yvland src/schooltool/email folder16:29
replaceafillyvl, :O16:29
yvlcool :)16:29
replaceafillyvl, i'd have to move some stuff around, but it's not a big deal :)16:30
replaceafillyvl, right now i've put things in the schooltool.app package16:30
yvlwell, it will be harder to move after release :)16:30
replaceafillyvl, definitely!16:31
replaceafillyvl, will move it to it's own package then16:31
yvlthanks16:31
yvlas for the password button, you can cheat a bit:16:31
yvlrender read-only ***** field manually16:31
yvland name the password field as "change password"16:32
* replaceafill is processing yvl's idea16:32
replaceafillyvl, ah you mean, change the field's label to "Change password"16:33
yvlyes16:33
yvland render a "fake" field "Password: ********"16:33
replaceafilljust text, right?16:33
yvlit's contents: '*'.len(real_password)16:33
yvlyes16:34
replaceafillvery nice, yvl :)16:34
replaceafillyvl, question16:34
yvllistening16:34
replaceafillhow do you think is best for the utility to know if it should send emails?16:34
replaceafilli mean16:34
replaceafillsuppose the user doesn't set up the mail fields16:35
replaceafillbut some client code tries to look up the utility16:35
replaceafillmailer = getUtility(...)16:35
replaceafillmailer.send(...)16:35
yvlhmm16:36
replaceafillright now my utility tries to do it based on the "smtpHostname" setting16:36
replaceafillif it is set, then it's possible to send the mail16:36
replaceafillbut it feels fragile16:37
yvlyeah16:37
yvlhmm16:37
yvlmaybe add a flag smtp_valid in the utility if its persistent16:38
yvland a method validateSMTP16:38
yvlthat tries to send the last email from the queue16:39
yvlumm, I get the feeling I'll get not clear again16:39
yvlbasically - depend on ("smptHostName set" & "lastDeliverySucceeded") for now16:40
replaceafilllastDeliverySucceeded :O16:40
yvlwell, mailer should fail if it can't connnect to SMTP server somehow16:41
yvlan exception maybe?16:41
replaceafillwell, the IEmailMessage objects are persistent16:41
yvlI don't remember the code :\16:41
replaceafillthey store the message and the time they were created16:42
replaceafillthey're stored in the 'schooltool.email' container16:42
replaceafillclient code calls the utility16:43
replaceafilland uses the .send(...) method16:43
replaceafilland the client code doesn't give a damn if the mail was delivered or not16:43
replaceafillbut the administrator can get to the container16:43
replaceafilland see stuck mail16:44
replaceafilland there's a "Retry Now" button16:44
* replaceafill hasn't published his branch cause he knew lots of things would change after this discussion :)16:45
yvl:)16:46
yvlwho will handle the automatic retries?16:47
replaceafillmanual retries, the site administrator16:47
replaceafillrigth th1a?16:47
*** dlobo has joined #schooltool16:48
th1aWe could add automatic retries later.16:48
yvlso the utility is a minimalistic thing that just sends the given IEmailMessage16:49
replaceafill:(16:49
yvlif fails, it puts it in the container16:49
yvlright?16:49
replaceafillyes16:49
replaceafillthe container should be named, "schooltool.failed_emails" :D16:49
replaceafilland once they are sent they are deleted, or the site administrator can delete them manually too16:50
*** alga has quit IRC16:51
yvlhow do you do manual re-sending?16:51
replaceafillyou mean UI?16:51
yvlutility.send(app['failed_emails'][0]) ?16:51
yvlor .pop()16:51
replaceafilltraverse the selected ones16:52
replaceafilland yes utility.retry(message)16:52
replaceafillsend was for the first time try16:52
yvlwhy the retry method?16:53
yvlmaybe utility can figure out if the message is already in the emails container?16:54
replaceafillutility.send is supposed to be called by client code16:54
replaceafillutility.send(from, to_list, message_as_string)16:55
replaceafillif it has no success, it creates the persistent failed message16:55
yvlok16:56
replaceafillthen, with the "Retry Now" button, i call utility.retry(message)16:56
replaceafillmessage has all the needed information stored16:56
replaceafillyvl, thoughts? :)16:57
yvlthe retry method just looks weird16:58
yvlumm, out of place a bit16:58
yvlbut I get that strange feeling too often ;)16:58
replaceafilland you're right sometimes, right? :P16:58
yvl... :)16:59
replaceafillwell, i think we need two methods, one for the first try and one for the retries16:59
replaceafillif the first try succeeds, no message is needed16:59
replaceafilldo you think a single method would be enough?16:59
replaceafillor maybe another approach?17:00
replaceafillmaybe the client code should be responsible for creating the persistent message before sending it?17:00
yvlumm, two methods are ok17:00
yvlif you also get a container of util.failed_mesages17:01
yvlso you can do stuff like util.failed_messages.keys()17:01
yvlfailed_ids = [id for id in util.failed_messages.keys()]17:01
yvland then17:02
yvlfor id in failed_ids:17:02
yvl   util.retry(id)17:02
yvland util would handle deleting form container on success17:02
yvland you can call failed_messages "queue"17:02
yvlan OrderedContainer could be useful maybe17:03
replaceafillFIFO?17:03
yvlsomething along the lines17:04
replaceafillhow would client code get to the sending functionality?17:04
replaceafilli mean first time17:05
yvlsame as before17:05
replaceafillah ok17:05
yvl.send(X, Y, Z)17:05
yvlbut util would be also responsible for managing the message queue17:05
replaceafillyvl last thing on my mind17:06
replaceafillperformance :)17:06
replaceafilli know "first do it, then do it right, then do it fast" :)17:06
replaceafillbut, supposed the user selects 100 failed emails17:07
replaceafillthe sending could block the process, right?17:07
yvlwell yes17:07
replaceafillzope.sendmail uses threads for that17:07
yvlwe can change util.retry(id) to just mark messages for retrying17:08
yvllater17:08
replaceafilland what about the "Now" part in the "Retry Now" button :)17:08
yvland some cron job or something will use sane amount of messages at a time17:08
yvlFor now, its "Retry Now"17:09
replaceafillah ok17:09
yvllater, well...17:09
yvlsome of the messages will have "RETRYING..."17:09
ignasemm, really block?17:09
ignasI would assume that retry17:09
ignasjust queues up the messages17:09
ignasnot actually sends them17:09
yvlfor now, it sends them17:09
ignassending 100 messages does not block, because sending is done in background, retry does not block because ... ;)17:10
yvlwe'll do the sending in the background "real soon now" ;)17:10
yvlreplaceafill, you were right to bring this up17:11
replaceafillyvl, yes i knew at some point i had to ask you this :)17:11
*** dlobo has quit IRC17:13
yvlso, for now do the straightforward version17:13
yvland I'll try not to block you too much17:13
yvland add cron job functionallity in schooltool, well, soonish :)17:14
replaceafillyvl, i'll move the code to its right place and will show it to you17:14
replaceafillthanks yvl, th1a, ignas :)17:15
th1ayvl: Just for future reference, are you ok with traveling to, say, Cambodia or Bangaladesh?17:18
yvlsure, th1a17:24
th1aJust checking.17:24
*** menesis has joined #schooltool17:27
*** dlobo has joined #schooltool17:36
*** dlobo has quit IRC17:39
*** aelkner has quit IRC18:14
*** aelkner has joined #schooltool18:14
*** ignas has quit IRC18:38
*** replaceafill has quit IRC18:44
*** alga has joined #SchoolTool19:01
*** dlobo has joined #schooltool19:03
*** krushik has quit IRC19:11
*** krushik has joined #schooltool19:11
*** menesis has quit IRC20:03
*** menesis has joined #schooltool20:03
*** menesis has quit IRC20:03
*** menesis has joined #schooltool20:03
*** krushik has quit IRC20:32
*** krushik has joined #schooltool20:40
*** pcardune has joined #schooltool20:42
*** pcardune has quit IRC21:54
*** pcardune has joined #schooltool22:44
*** dlobo has quit IRC22:58
*** jelkner has joined #schooltool23:17
*** dlobo has joined #schooltool23:24

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!