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
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.
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
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
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
--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.
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 -
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
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
> 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
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
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
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
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
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
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
&
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.
re the file contents?
I've searched the groups but it appears that everyone is using the SQL
libraries to produce their forms...
--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
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
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
--~--~-~--~~~---~-
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
> 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
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
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",
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
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
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
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
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
30 matches
Mail list logo