BTW, is this list the right place for submitting patches?
Cheers,
Daniel
Just noticed on http://docs.turbogears.org/Contributing that patches
should go to trac as new tickets after discussion so I guess I'm
asking for comments now.
Cheers,
Daniel
Hi Daniel,
nice patch! I'll have a closer look at it later today. I think this is a
useful addition, so I suggest you go ahead and create an enhancement ticket.
Please note that new features should go to the 1.1 branch now. Can you
make a new patch for the 1.1 branch? Also, please format your source
code according to PEP 8:
http://www.python.org/dev/peps/pep-0008/
Chris
It's http://trac.turbogears.org/ticket/1709
> Please note that new features should go to the 1.1 branch now. Can you
> make a new patch for the 1.1 branch?
Yep, it's now for the 1.1 branch.
> Also, please format your source code according to PEP 8:
>
> http://www.python.org/dev/peps/pep-0008/
As far as I can tell the formatting is correct. I changed the Onetime
name to Single so now the classes are SingleTask, ThreadedSingleTask,
ForkedSingleTask and the function add_single_task.
Cheers,
Daniel
No problem :)
Just noticed the duplicate, the thing is that on the version I sent to
the mailing list from which you created ticket/1710 the names were
such as OnetimeTask, add_onetime_task, etc and on ticket/1709 I
renamed them to SingleTask, add_single_task, etc because Chris
mentioned PEP-8 which I took to mean that Onetime should be OneTime
which didn't look very good to me.
In addition ticket/1709 is for trunk 1.1 while ticket/1710 is for
trunk 1.0 (although as far as I can tell scheduler.py is the same),
again something Chris asked for so I guess 1709 is the relevant ticket
not 1710 (although as things are marked now, 1709 is closed and 1710
is open). Kinda confusing :)
Cheers,
Daniel
No, I meant the improper white space after opening parantheses and such
things.
Anyway, I'm just in the process of cleaning up the whole scheduler
mdoule and making it PEP-8 compliant. I'll then integrate your new patch
with the new names (which I like better). It'll be ready in a couple of
minutes.
> In addition ticket/1709 is for trunk 1.1 while ticket/1710 is for
> trunk 1.0 (although as far as I can tell scheduler.py is the same),
> again something Chris asked for so I guess 1709 is the relevant ticket
> not 1710 (although as things are marked now, 1709 is closed and 1710
> is open). Kinda confusing :)
I don't think we should have two different tickets for the same issue
for the different branches. New features should go in bramch 1.1 and if
we want to backport them to 1.0, we can open a ticket for this task once
the feature is complete in 1.1.
Chris
The new patch is now added. Can somebody else please review the
functions as well?
BTW, there seem to be no unit tests for the scheduler module. Should we
open a ticket for this?
Chris
As far as I understand, TG2 will be based on Pylons which seems to use a
FastCGI configuration (at least as recommend production environment)
instead of a custom server like CherryPy. If this is true, it has some
serious implications for "server plugins" like the scheduler or TurboMail.
Previously we could rely on the server which was always available. FastCGI
processes will be killed after a certain amount of request (or a configured
time) so it must not be assumed that at least one process is always
running. (Am I completely wrong?)
Do you have some ideas how to deal with this problem?
fs
FastCGI may be supported, but it's far from the default in pylons
anymore... Seems like lots of people are using ModWSGI these days.
--Mark
--
Mark Ramm-Christensen
email: mark at compoundthinking dot com
blog: www.compoundthinking.com/blog