On 4/28/14, Steffen Hoffmann <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 28.04.2014 15:30, Christopher Nelson wrote: >> I know I can't guarantee the order of ticket change listeners but if I >> have one that depends on another, is there some way that I can requeue >> the current listener if it detects the other hasn't run yet? >> >> In Tcl you can add something to the event queue with `after idle`. >> Off the top of my head (I haven't written Tcl in years), it'd be like: >> >> func myEventHandler(a, b, c) { >> # If our predecessor hasn't executed yet >> if [ ! someCondition ] { >> # Reschedule this invocation to be run when the interpreter >> # is idle (all other events have been processed) >> after idle $* >> } >> else { >> ... real event handling here >> } >> } >> >> That'd be a great solution here but I don't know how to do that in Trac. > > Trac has trac.config.OrderedExtensionsOption [1] for this. > > I guess, that unordered ExtensionsOption has been chosen for change > listeners on purpose. IMO these components shall not implement > side-effects on changed resources, as your description suggests for you > component.
<jftr> I mostly agree ... but , even if I do not know about the particular use case of Christopher , side-effects upon other resources are still allowed in change listeners (e.g. store traces in DB , and so on ... ) </jftr> [...] -- Regards, Olemis - @olemislc Apache(tm) Bloodhound contributor http://issues.apache.org/bloodhound http://blood-hound.net Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article: -- You received this message because you are subscribed to the Google Groups "Trac Development" 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 http://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/d/optout.
