[web2py] Numerical List of Entries

2012-09-10 Thread AE
Hello I was wondering if anyone can tell me how I can create a numerical list of pages to use with my pagination I have a db query that selects alphabetically based on the title and would like to create a numerical index of the pages to link to. Currently I am using web2py_utils for pagination

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
I understand getting a different session is expected. I'm talking about different behavior in how requests are dispatched to threads. The above scenarios for example which leads me to believe you can't reliably use long running functions.

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
I can say that using two different browsers (FF & Chrome) from the same host does not exhibit the same behavior as two tabs/windows from the same browser (same profile...). On Jan 19, 1:46 pm, ron_m wrote: > I remember session.forget() documented as a performance enhancement - no > plans to alter

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
fault is 8 and I'm setting max to 2, it seems likely that somethings doing: max = min if max < min else max On Jan 19, 3:16 pm, Jonathan Lundell wrote: > On Jan 19, 2011, at 11:48 AM, ae wrote: > > > > > --maxthreads does nothing if you don't specify --minthread

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
Now that I think about it, it seems likely that somewhere something's doing: if maxthreads < minthreads: maxthreads = minthreads On Jan 19, 2:48 pm, ae wrote: > --maxthreads does nothing if you don't specify --minthreads, so that > should be fixed one way or another.  I

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
--maxthreads does nothing if you don't specify --minthreads, so that should be fixed one way or another. I don't know if that problem is in web2py or Rocket.

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
On Jan 19, 10:14 am, ae wrote: > Well, maybe not.  I just downloaded 1.91.6 and I couldn't replicate > the behavior.  We use 1.67.1 in production and what I tested on might > have been even older than that. So I'm back to not sure again. When I tested earlier I used the -

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
On Jan 18, 11:21 pm, Anthony wrote: > I tried this (the session.forget() version), and sayjunk is still being > blocked for 30 seconds while waiting for blockme to finish (only when in the > same browser -- I can load sayjunk in a different browser, which starts a > different session). Am I miss

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
On Jan 19, 9:17 am, Anthony wrote: > On Wednesday, January 19, 2011 8:18:25 AM UTC-5, ae wrote: > > > I have lots of users and when one thread takes a long time, some users > > can keep accessing controller functions and some can't.  Once the long- > > running cont

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
> No, a cookie is associated with a session. Agreed. I'm pretty much using 'cookie', 'user', 'session', and 'browser' as interchangeable for my purposes. A cookie is associated to a session, but somehow a session is associated to a thread. Either that or I'm seeing some other effect for which I

[web2py] Re: Long-running controllers

2011-01-19 Thread ae
On Jan 18, 11:21 pm, Anthony wrote: > Am I missing something? Yes. You're probably running web2py with the default number of threads (30 I think?). Your 2nd browser window's cookie is unlikely to get associated to the same thread. I have lots of users and when one thread takes a long time, som

[web2py] Re: Long-running controllers

2011-01-18 Thread ae
On Jan 18, 9:17 pm, Jonathan Lundell wrote: > On Jan 18, 2011, at 5:41 PM, ae wrote: > > > > > On Jan 18, 11:22 am, Jonathan Lundell wrote: > > >> When you say "anyone associated with the thread", do you mean other > >> requests using so

[web2py] Re: Long-running controllers

2011-01-18 Thread ae
On Jan 18, 5:06 pm, cjrh wrote: > > I suggest you present some code to this group that shows how laborious > it is, and ask for simplifications.  I am not a javascript guru, but > some do lurk here and that would be the best way to make it less > laborious.  web2py itself does have some helpers

[web2py] Re: Long-running controllers

2011-01-18 Thread ae
On Jan 18, 11:22 am, Jonathan Lundell wrote: > > When you say "anyone associated with the thread", do you mean other requests > using some shared, locked resource (like the session)? Or something else? Browser sessions seem to get associated to a thread. As long as that thread is busy the use

[web2py] Long-running controllers

2011-01-18 Thread ae
How do people deal with controller functions that take a long time? (waiting for a subprocess or connection to another host, for example) It seems that while a thread is busy, anyone associated with the thread can't use the application. I can see the benefit of this (one user can't consume many t

[web2py] Re: run-away threads

2010-10-26 Thread ae
files. Obviously, I test each controller function but there must be some set of conditions that leads to this which my tests do not cover. Thanks. On Oct 24, 9:06 pm, cjrh wrote: > On Oct 25, 1:42 am, ae wrote: > > > Every so often, I have to restart web2py because no threads will &

[web2py] run-away threads

2010-10-24 Thread ae
Every so often, I have to restart web2py because no threads will respond. I guess that some set of conditions in one of my controllers leads to an infinite loop? Is there a way to set a timeout on controller functions? Can you suggest any way to troubleshoot? Thanks.

[web2py] Upload

2010-08-02 Thread ae
re the file contents? I've searched the groups but it appears that everyone is using the SQL libraries to produce their forms... --ae

[web2py] Re: forcing request.vars.something to be a list

2010-07-16 Thread ae
I never said request.vars is a list. If I have a multiple select box on a page and one entry is selected then I get a string. If multiple entries are selected, I get a list of strings. That's not good. One Two Three Four request.vars.things could be something like "two" or like ["one

[web2py] forcing request.vars.something to be a list

2010-07-16 Thread ae
I've been doing this: if not isinstance(request.vars.things, list): request.vars.things = [request.vars.things] for thing in things: ... Is there a way to force a var to be a list? I would rather always do request.vars.thing[0] for a single value than have to use isinstance(). --Todd

[web2py:25944] Re: MySQLdb stored procedure oddness

2009-07-08 Thread ae
I'm using the MySQLdb module directly; I'm not using web2py's SQL module. Also, I'm running on mod_wsgi although I don't think that would make any difference. web2py 1.55/Python 2.5.2/MySQL 5.1 Thanks for looking. --ae --~--~-~--~~~---~-

[web2py:25883] MySQLdb stored procedure oddness

2009-07-07 Thread ae
is through the regular mysql client or by running them through small python scripts (those both work ok). Any thoughts? --ae --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. T

[web2py:20848] Re: existing database

2009-04-29 Thread ae
> ProgrammingError: (2014, "Commands out of sync; you can't run this > command now") In the interest of being complete: _cursor.nextset() solves this, but you have to call fetchall() (or whatever...) and collect info from _cursor.description before calling nextset(). I did this by overriding ex

[web2py:20815] Is it safe to use MySQLdb directly?

2009-04-29 Thread ae
Is it safe to use the MySQLdb module directly? The documentation indicates that each thread needs it's own connection object. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to

[web2py:20814] Re: existing database

2009-04-29 Thread ae
Also, when I try to call a stored procedure, I get this: db.executesql("call my_proc('junk')") Traceback (most recent call last): File "/ita/installs/bliss/web2py/gluon/main.py", line 334, in wsgibase SQLDB.close_all_instances(SQLDB.commit) File "/ita/installs/bliss/web2py/gluon/sql.py",

[web2py:20805] existing database

2009-04-29 Thread ae
ld I organize the code so that MVC principals are observed? Any help appreciated. ae --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@g

[web2py:20652] Re: Accessing _cursor object OK?

2009-04-27 Thread ae
Subclassing SQLDB will be fine. I should have thought of it. Thanks, ae --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegro

[web2py:20648] Re: Accessing _cursor object OK?

2009-04-27 Thread ae
It doesn't appear that executesql is used internally. I prefer not to have a locally modified version of gluon. How about: def executesql_with_description(self, sql): ... you named it _cursor! ;) --~--~-~--~~~---~--~~ You received this message because you ar

[web2py:20644] Re: Accessing _cursor object OK?

2009-04-27 Thread ae
ursor from outside SQLDB. Is every database module you wrap DBAPI 2.0 compliant enough to do this? ae --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send

[web2py:20634] Accessing _cursor object OK?

2009-04-27 Thread ae
the column headings from db._cursor.description after running db.executesql() ? ae --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email