If you want a realtime solution, you can trigger an email on each error.
Here's a sketch:
1. Add an error handler to routes.py:
routes_onerror = [
('appname/*', '/appname/default/show_error')
]
2. and in default.py:
def show_error():
I just discovered this sweet hidden improvement:
db(db.mytable.id1).select()
Rows (648)
The Rows object now prints out the number of rows in the repr() function!
That's so useful!
Thanks everyone!
--
This is awesome! Thanks for the example!
On Thursday, August 30, 2012 1:56:09 PM UTC-7, Anthony wrote:
db.define_table('person', Field('name'), Field('email'))
db.define_table('dog', Field('name'), Field('owner', 'reference person'))
db.executesql([SQL code returning person.name and
Wow, this is cool!
But I'm hitting a bug in rewrite_on_error:
http://code.google.com/p/web2py/issues/detail?id=964
--
I'm really excited about the new scheduler -X option.
What do -E -b -L do? I don't see them in --help or in the widget.py code.
On Wednesday, August 29, 2012 10:17:48 PM UTC-7, Michael Toomim wrote:
Wow, this is cool!
But I'm hitting a bug in rewrite_on_error:
http://code.google.com/p
Sometimes you write things that are just really exciting.
--
That is true!
It makes me think, perhaps it would be worthwhile at some point to pause,
take stock of all the features, which ones might be better than which other
ones, and write up a set of best practices to put into the book.
On Wednesday, August 29, 2012 12:49:29 PM UTC-7, Richard wrote:
This makes sense to me too!
The simple way would break backwards compatibility. But this could be
avoided if hash function first checks to see if a schema file exists WITH
the password, and returns that, else returns a hash w/o the password.
On Tuesday, August 28, 2012 10:17:02 AM UTC-7, Chris
Oh, I see, these are scheduler.py options!
-b: sets the heartbeat time
-L: sets the logging level
-E: sets the max empty runs
On Wednesday, August 29, 2012 10:23:29 PM UTC-7, Michael Toomim wrote:
What do -E -b -L do? I don't see them in --help or in the widget.py code.
--
Thanks for the great work on the scheduler niphlod!
On Wednesday, August 1, 2012 1:19:48 PM UTC-7, Niphlod wrote:
The consideration behind that is that if your function doesn't return
anything, you don't need the results. Backward compatibility is quite
broken in that sense (but scheduler
, July 10, 2012 5:04:43 PM UTC-4, Michael Toomim wrote:
I just upgraded to the trunk. I'm trying to log into the admin, but there's
no password entry box.
What's wrong? How can I debug this?
Ah, so I was wrong, great, thank you!
On Jul 10, 2012, at 3:20 PM, Massimo Di Pierro wrote:
The normal behavior is, as Dave indicated, that you must be over https or
from localhost. The change in trunk is that the condition is false, the login
form is not even displayed to prevent you from
On Friday, July 6, 2012 6:35:43 PM UTC-7, Massimo Di Pierro wrote:
2. Remove Share link from welcome app
I think we agreed to remove Share link because it's not used very much.
I think we agreed to remove the link to addtoany. Do you really want to
remove the share tab at the bottom? I
This is a nice solution, and clever, thanks!
The upside (compared to postgres locks, as discussed above) is this works
for any database. The downside is it creates a whole new table.
On Thursday, July 5, 2012 2:49:36 PM UTC-7, nick name wrote:
This might have been solved in this week, but in
On Wednesday, June 27, 2012 5:02:26 PM UTC-7, ptressel wrote:
This won't solve your installation / setup issue, but I wonder if it would
help with the overrun and timeout problems... Instead of scheduling a
periodic task, what about having the task reschedule itself? When it's
done with
Maybe this should go into the docs somewhere. Maybe the scheduler docstring
next to the upstart script? Maybe post an issue on google code to update the
docs? http://code.google.com/p/web2py/issues/list
On Jun 28, 2012, at 5:41 AM, Tyrone wrote:
Hi Guys,
Although this script works great
I'm totally interested in solutions! It's a big problem I need to solve.
The recurring maintenance task does not fix the initialization
problem—because now you need to initialize the recurring maintenance task.
This results in the same race condition. It does fine with the 40,000
records
The problem with terminating the processes is:
• sometimes they don't respond to control-c, and need a kill -9
• or sometimes that doesn't work, maybe the os is messed up
• or sometimes the developer might run two instances simultaneously,
forgetting that one was already running
You're
messed up maybe require you to check the os, python
programs can't be omniscient :D
- messy developers, no easy fix for that too
On Wednesday, June 27, 2012 9:18:06 PM UTC+2, Michael Toomim wrote:
The problem with terminating the processes is:
• sometimes they don't respond
to be biting a few of us.
On Jun 20, 2012, at 1:19 PM, Rene Dohmen wrote:
I'm having the same problem:
https://groups.google.com/d/msg/web2py/hCsxVaDLfT4/K6UMbG5p5uAJ
On Mon, Jun 18, 2012 at 9:30 AM, Michael Toomim too...@gmail.com wrote:
I just got bit by the reserved-word problem:
https
This is all a great unearthing of the Mystery of Transactions. Thanks for
the investigation, Doug.
This was difficult for me to learn when I got into web2py as well. Perhaps
we could write up all this knowledge somewhere, now that you're figuring it
out?
Can we have a section on Transactions
All, thank you for the excellent discussion!
I should explain why I posted that recommendation. The vision of using
the scheduler for background tasks was:
Woohoo, this scheduler will *automatically handle locks*—so I don't need
to worry about stray background processes running in parallel
('process_bonus_queue')
On Tuesday, June 26, 2012 7:57:25 PM UTC-7, Michael Toomim wrote:
All, thank you for the excellent discussion!
I should explain why I posted that recommendation. The vision of using
the scheduler for background tasks was:
Woohoo, this scheduler will *automatically handle
in the scheduler.
I don't recommend using the scheduler as a task queue to anybody.
On Tuesday, June 12, 2012 10:24:15 PM UTC-7, Michael Toomim wrote:
Here's a common scenario. I'm looking for the best implementation using
the scheduler.
I want to support a set of background tasks (task1, task2
Er, let me rephrase: I don't recommend using the scheduler for *infinitely
looping background tasks*.
On Monday, June 25, 2012 4:54:30 PM UTC-7, Michael Toomim wrote:
This scenario is working out worse and worse.
Now I'm getting tasks stuck in the 'RUNNING' state... even when there
aren't
I just got bit by the reserved-word problem:
https://groups.google.com/d/msg/web2py/aSPtD_mGXdM/c7et_2l_54wJ
I am trying to port a postgres database to a friend's mysql database, but
we are stuck because the DAL does not quote identifiers.
This problem has been discussed a fair amount:
Thanks for the response, niphlod! Let me explain:
The task can be marked FAILED or EXPIRED if:
• The code in the task throws an exception
• A run of the task exceeds the timeout
• The system clock goes past stop_time
And it will just not plain exist if:
• You have just set up the code
To respond to your last two points:
You're right that models only runs on every request... I figured if my
website isn't getting any usage then the tasks don't matter anyway. :P
Yes, I think there are design issues here, but I haven't found a better
solution. I'm very interested in hearing
Here's a common scenario. I'm looking for the best implementation using the
scheduler.
I want to support a set of background tasks (task1, task2...), where each
task:
• processes a queue of items
• waits a few seconds
It's safe to have task1 and task2 running in parallel, but I cannot have
I'm finding multiple problems getting cron to start the scheduler. Here's
the cron line:
@reboot dummyuser python web2py.py -K utility
...but it does not work without modifying web2py source.
First, let's get an easy bug out of the way. The web2py book gives this
example for @reboot:
I need to be able to dispatch to a different controller based on a database
lookup. So a user will go to a url (say '/dispatch'), and we'll look up in
the database some information on that user, choose a new controller and
function, and call that controller and function with its view.
I've
:56 AM UTC-4, simon wrote:
You can do:
def dispatch():
controller,function = ... load these from the database ...
redirect(URL(c=controller, f=function, vars=request.vars,
args=request.args))
On Friday, 11 May 2012 10:17:19 UTC+1, Michael Toomim wrote:
I need to be able
a different network interface.
On Thursday, May 3, 2012 1:22:25 PM UTC-7, Michael Toomim wrote:
Anyone have a recipe to make the scheduler run on boot? I'm using ubuntu.
Web2py is run in apache (using the recipe in the book), so I can't just use
the cron @reboot line.
This is the line that needs
Also:
1. replace friendbo with the name of your app.
2. To start/stop the scheduler, use
sudo start web2py-scheduler
sudo stop web2py-scheduler
sudo status web2py-scheduler
...etc.
On Saturday, May 5, 2012 6:47:33 PM UTC-7, Michael Toomim wrote:
Here's a solution I wrote
Anyone have a recipe to make the scheduler run on boot? I'm using ubuntu.
Web2py is run in apache (using the recipe in the book), so I can't just use
the cron @reboot line.
This is the line that needs to be run when my system boots:
python /home/web2py/web2py/web2py.py -K appname
It seems
I think the best combination of web2py and bottle would be, as you
suggested—importing the web2py DAL into bottle.
The DAL is the most important thing that bottle lacks, and the web2py DAL
is great to plug into other projects. I use it a lot for that.
That said, in my experience, you will
This is cool! how do we use it?
On Sunday, January 9, 2011 5:07:28 PM UTC-8, Dane wrote:
Hey all, thought you might be interested to know that I just patched a
project HamlPy, a library for converting a pythonic haml-like syntax
to django templates/html, to work with web2py templates.
It
Here's an improved way to create indices in the DAL. Works only with
postgresql and sqlite.
def create_indices(*fields):
'''
Creates a set of indices if they do not exist
Use like:
create_indices(db.posts.created_at,
db.users.first_name,
Well, I don't need to debug this anymore. I switched to a different
facebook app, and I'm no longer having the problem.
On Dec 21, 7:55 pm, Michael Toomim too...@gmail.com wrote:
I just upgraded from a modified 1.98.2 to 1.99.4 and now I'm getting
an infinite redirect when logging
I just upgraded from a modified 1.98.2 to 1.99.4 and now I'm getting
an infinite redirect when logging in with OAuth20 and facebook.
I'm having trouble debugging. Can someone help?
What happens:
User goes to /user/login
This calls this code in tools.py:
# we need to pass through
Hi all, it appears I can't use any of my own classes in the cache:
class Blah:
pass
b = blah()
cache.disk('blah', lambda: b)
This results in:
AttributeError: 'module' object has no attribute 'Blah'
I think this is because the things I'm defining (e.g. in models/)
isn't
So let me tease these problems apart.
1. Some objects are not pickleable. These cannot be cached to disk.
2. If the object's class is not defined in the scope available to
gluon/cache.py, then the object cannot be unpickled.
Both of these problems can be avoided by using cache.ram. (That's what
What's the status of the new VirtualFields design? The latest
I've seen is:
db.item.adder=Field.lazy(lambda self:self.item.a + self.item.b)
I have two design proposals:
(1) Instead of calling them VirtualFields and Lazy VirtualFields,
I think they should be VirtualFields and Methods. Two
'}}
{{selector(id='main-access')}}
This is already supported and allows to define more than one function
in include. And it is more pythonic.
On Sep 9, 10:12 pm, Michael Toomim too...@gmail.com wrote:
I frequently write short snippets of HTML that I want to replicate in
many places
I think we need more tools for fixing broken migrations!
When I have something broken, sometimes I go into the sql console,
edit the database manually, and then use these functions to tell
web2py that I've changed the table in sql. (However, I haven't had to
use these for at least a year...
I frequently write short snippets of HTML that I want to replicate in
many places, like:
div class=friend_selector
div class=access_photos users=[]/div
input id=main_access_input name=access_input
class=access_input size=30 type=text
After some thought, I'm really liking this design for virtual
fields... what if lazy/virtual fields were declared directly in
db.define_table()? Like so:
db.define_table('item',
Field('unit_price','double'),
Field('quantity','integer'),
Interesting approach to use lambdas. Since lambdas don't do side-
effects, I checked out my virtualfields to see if my uses have side
effects.
In my app I have:
12 methods total across 3 database tables
10 of those methods have no side-effects
2 have side-effects
The two methods with
I'm sorry, that was a doofus comment. Of course lambdas allow side-
effects! I wish mailing lists supported delete.
On Aug 27, 1:08 pm, Michael Toomim too...@gmail.com wrote:
Interesting approach to use lambdas. Since lambdas don't do side-
effects, I checked out my virtualfields to see
I don't have a direct solution, but FYI I added this info to a bug
report on a related topic. http://code.google.com/p/web2py/issues/detail?id=374
Thanks for pointing out the problem.
On Aug 14, 8:57 am, Santiago Gilabert santiagogilab...@gmail.com
wrote:
anyone?
I found that someone else
Ok, it's here http://code.google.com/p/web2py/issues/detail?id=374
Thank you for looking into this Massimo! I do not know the best way to
do this... my code is just a first reaction to making something
faster.
On Aug 11, 2:55 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
This is
Often I'm at the shell and want to quickly pull up the most recent
entry in a table. I wrote a couple of helpers for this.
For instance, in a blog app:
db.posts.last()
...will get the most recent post.
By putting this code at the bottom of db.py, it'll automatically
create a first() and
I agree not a big deal:
http://www.quora.com/Should-buttons-in-web-apps-be-capitalized
On Aug 11, 3:24 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
What do people think?
http://code.google.com/p/web2py/issues/detail?id=370
I do not have a strong opinion.
Ok. The basic idea is to allow you to define helpers methods on rows,
sort of like the Models of rails/django.
You use it like this... I put this in models/db_methods.py:
@extra_db_methods
class Users():
def name(self):
return '%s %s' % ((self.first_name or ''),
to rows with
only a 10% overhead (instead of 200-300%) and can share that if
anyone's interested.
On Aug 8, 8:38 pm, Michael Toomim too...@gmail.com wrote:
It turns out the speed problem is REALLY bad. I have a table with
virtualfields of 14,000 rows. When I run raw sql:
a = db.executesql
():
print row.b, row.c(1), row.c(2), row.c(3)
On Aug 1, 3:10 pm, Michael Toomim too...@gmail.com wrote:
Maybe it helps for me to explain my use-case. I mainly use virtual fields
as lazy methods, to help traverse related tables. I was actually surprised
that lazy evaluation wasn't
Mid-status note: it would be great if the profiler worked with the
web2py shell!
Then I could run commands at the command prompt in isolation and see
how long they take.
On Aug 8, 8:38 pm, Michael Toomim too...@gmail.com wrote:
It turns out the speed problem is REALLY bad. I have a table
)
On Aug 1, 3:10 pm, Michael Toomim too...@gmail.com wrote:
Maybe it helps for me to explain my use-case. I mainly use virtual fields as
lazy methods, to help traverse related tables. I was actually surprised that
lazy evaluation wasn't the default. I noticed a few implications
be
pickled, and excluding them if not.
Anthony
On Mon, Aug 1, 2011 at 5:30 AM, Michael Toomim too...@cs.washington.edu
wrote:
Awesome! I did not know there was an issue submission system.
On Jul 30, 2011, at 7:02 AM, Anthony wrote:
An issue has been submitted, and this should
I think I found a bug in virtualfields. I have the following
controller:
def posts():
user = session.auth.user
n = user.name # returns None
Where person is defined as a virtualfield on user:
class Users():
def name(self):
return self.users.first_name + ' ' +
Great!!
I also had threads=25 and changed this to threads=1 processes=5,
so it makes sense that I was encountering the same problem. It sounds
like something in web2py might not be thread-safe. The next time I
run a production test I will report if this fixes the problem.
On Feb 10, 2:38 pm,
The biggest django pain points to me:
- Templating system is a PAIN. You have to learn a new language,
and in the end it's not as powerful as python.
- Database ORM can be a pain. Same reasons. You have to learn a
big special-purpose API in addition to SQL, and learn how it
translates
Yes, this echos my experiences exactly! Using apache ab benchmark
alone would NOT trigger the error. I had plenty of RAM available.
Seems to be a concurrency bug.
On Jan 19, 10:53 am, VP vtp2...@gmail.com wrote:
What is curious is that RAM is still available, with this error.
Monitoring CPU
I have pool_size=100, and get the error.
On Jan 17, 12:20 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
You should really have
db = DAL('postgres://name:password@localhost:5432/db',pool_size=20)
The reason is that client-server databases may set a max to number of
open connections
The problem for me is that this occurs on a webapp used by mechanical
turk, and it fails when I have hundreds of mechanical turkers using my
app... which only happens when I pay them hundreds of dollars. So
it's hard to reproduce right now without hundreds of dollars.
I am excited to try using
1.74.5. I will upgrade when I can reproduce the problem locally.
On Jan 17, 5:13 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
How old web2py? We have had bugs in the past that may cause your
problem.
You should try upgrade.
Massimo
On Jan 17, 6:58 pm, Michael Toomim too
I find it easiest and cleanest to reformat data structures in python,
using list comprehensions. Javascript sucks for loops. So instead of
jsonifying the raw database output, fix it first:
export_optimizer_records = [{'FreezeTime': r.panel_1hrs.FreezeTime,
'StringID': r.panel_1hrs.StringID,
I'm still having this problem too (previous posts linked below). I
would love to find a solution. I'm not sure how to debug.
VP: Can you provide instructions for reproducing this bug using ab? I
had trouble using ab in the past. I am also on a VPS.
Since my last post (linked below), I have
Thanks, I just investigated this, but it looks like it did not fix the
problem.
In 8.4.6 Postgres changed the default wal_sync_method to fdatasync,
because the old default open_datasync failed on ext4. I use ext3 (on
ubuntu 9.10), but I tried changing this option in my postgres database
I wanted the equivalent of sqlite's create index if not exists on
postgresql. Here's a solution for web2py. It is useful whenever you
set up a new database, or migrate new tables to an existing database
after a code update and want to ensure the right indexes are set up.
def
Ah, preventing multithreading is a good idea to try too.
It wasn't a file descriptor problem either, I had
Files used: 1376 out of 75556
On Jul 20, 9:14 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
On Jul 21, 1:41 pm, Michael Toomim too...@gmail.com wrote:
I'm using daemon mode
.
--
Thadeus
On Tue, Jul 20, 2010 at 4:17 PM, Michael Toomim too...@gmail.com wrote:
Thank you for the clarification.
My wsgi.conf has default values, so I have not set maximum-requests.
Perhaps there are settings there I should look into?
I still have free memory, so perhaps
.
--
Thadeus
On Tue, Jul 20, 2010 at 4:17 PM, Michael Toomim too...@gmail.com wrote:
Thank you for the clarification.
My wsgi.conf has default values, so I have not set maximum-requests.
Perhaps there are settings there I should look into?
I still have free memory, so perhaps
information will be very useful.
Massimo
On Jul 19, 9:01 pm, Michael Toomim too...@gmail.com wrote:
I'm getting errors like these in my apache error logs:
[Mon Jul 19 18:55:20 2010] [error] [client 65.35.93.74] Premature end
of script headers: wsgihandler.py,
referer:http
of ubuntu, apache and mod_wsgi that
you are using? Any additional information will be very useful.
Massimo
On Jul 19, 9:01 pm, Michael Toomim too...@gmail.com wrote:
I'm getting errors like these in my apache error logs:
[Mon Jul 19 18:55:20 2010] [error] [client 65.35.93.74
pm, Michael Toomim too...@gmail.com wrote:
Let me also summarize the issues so far.
Originally:
- I got three types of error messages in apache logs
- Logging messages were often duplicated 2, 3, 5 times
- I got the IOError ticket a few times
- After a while the web
ways to investigate memory consumption to see where it's being
used.
On Jul 20, 8:23 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
On Jul 21, 1:03 pm, Michael Toomim too...@gmail.com wrote:
THANK YOU ALL SO MUCH for your help!
I just learned a LOT. It looks like resource
I'm getting errors like these in my apache error logs:
[Mon Jul 19 18:55:20 2010] [error] [client 65.35.93.74] Premature end
of script headers: wsgihandler.py, referer:
=1WL68USPJR0HY1ENS50GN6IJ33ZY32hitId=1TK6NH2ZSBU3RCI3F8FK7JE1YXMG96workerId=AJ8R357DF74FFturkSubmitTo=https%3A%2F%2Fwww.mturk.com
On Jul 19, 7:01 pm, Michael Toomim too...@gmail.com wrote:
I'm getting errors like these in my apache error logs:
[Mon Jul 19 18:55:20 2010] [error] [client 65.35.93.74] Premature end
And after a while apache completely freezes.
On Jul 19, 7:05 pm, Michael Toomim too...@gmail.com wrote:
This message about bucket brigade is also appearing in the apache
error log:
[Mon Jul 19 19:01:53 2010] [error] [client 183.87.223.111] (9)Bad file
descriptor: mod_wsgi (pid=7940): Unable
.
Is there a way to identify what is causing the Premature end of
script errors?
On Jul 19, 7:50 pm, Graham Dumpleton graham.dumple...@gmail.com
wrote:
On Jul 20, 12:01 pm, Michael Toomim too...@gmail.com wrote:
I'm getting errors like these in my apache error logs:
[Mon Jul 19 18:55:20 2010] [error
Now that I'm on apache, I find that the logging library iceberg wrote
no longer works:
http://groups.google.com/group/web2py/browse_thread/thread/ae37920ce03ba165/6e5d746f6222f70a
I suspect this is because of the stdout/stderr problem with wsgi, but
I thought that would only affect print
more flexible and
release a 1.1 in the next few days.
In the meantime, look into the cron thing.
-tim
On 4/4/2010 6:44 PM, Michael Toomim wrote:
I see, thank you. I want to measure the web server's response time
when I deploy this on turk... Unfortunately the rocket log does
and I'm using postgres not sqlite.
On Apr 5, 12:44 pm, Michael Toomim too...@gmail.com wrote:
Thanks guys. Each time I run a test, though, it costs me money
because I'm paying people on mechanical turk. And if it's slow, it
gives me a bad reputation. So I don't want to run more slow tests
I see, thank you. I want to measure the web server's response time
when I deploy this on turk... Unfortunately the rocket log does not
report time to serve a request. Do you think it is easy to get that
information from rocket? Do you store the start and stop times for
each request? I see
.
On Apr 4, 4:44 pm, Michael Toomim too...@gmail.com wrote:
I see, thank you. I want to measure the web server's response time
when I deploy this on turk... Unfortunately the rocket log does not
report time to serve a request. Do you think it is easy to get that
information from rocket? Do you
...@cs.depaul.edu wrote:
Some more questions:
how much ram?
can you check memory usage? A memory leak may cause slowness.
are you using cron? when cron starts it may spike memory usage.
are you experience the slowness from localhost or from remote
machines?
On Apr 4, 6:46 pm, Michael Toomim too
I was having slowness problems with cherrypy too! That's why I
switched to rocket. So perhaps it's something common to cherrypy and
rocket, or perhaps they are both slow in their own ways?
This is using web2py from march 16th, so it's not the latest rocket.
Do you think something important
.
On Mar 29, 12:10 pm, Timothy Farrell tfarr...@swgen.com wrote:
On 3/29/2010 1:39 PM, Michael Toomim wrote:
I was having slowness problems with cherrypy too! That's why I
switched to rocket. So perhaps it's something common to cherrypy and
rocket, or perhaps they are both slow in their own ways
are very low.
Are your models very complex?
On 27 Mar, 00:06, Michael Toomim too...@gmail.com wrote:
I'm using web2py+rocket to serve jobs on mechanical turk. The server
probably gets a hit per second or so by workers on mechanical turk
using it.
When I have no users, everything is fast
I'm using web2py+rocket to serve jobs on mechanical turk. The server
probably gets a hit per second or so by workers on mechanical turk
using it.
When I have no users, everything is fast. But in active use, I notice
that web pages often load reay slow in my web browser, but the
httpserver.log
Actually it's handling about 5 requests per second, so there is def
some concurrency.
On Mar 26, 10:06 pm, Michael Toomim too...@gmail.com wrote:
I'm using web2py+rocket to serve jobs on mechanical turk. The server
probably gets a hit per second or so by workers on mechanical turk
using
I can't create an index on postgresql using executesql. Here's what
happens:
db.executesql('create index bq_index on bonus_queue (hitid);')
...but the index does not show up in psql. It does not return
anything. It seems like the command might be blocking psql, because if
I run another index
Hi guys, I've found the following functions to be commonly useful in
practice. Has anyone else written anything similar? Is there a better
idiom here, or better names or interfaces for these?
def get_one(query):
result = db(query).select()
assert len(result) = 1, GAH get_one called when
Did you do anything special to use apachebench on the cherrypy
server? When I run ab http://localhost/init/; I get a
apr_socket_recv: Connection refused (111) error from apachebench.
If I do the same command when running the latest hg tip of web2py
(with rocket), the benchmark works.
I'm trying
I'm so excited! I was about to try moving to rocket myself, because I
need the scalability and it is very useful for my app to run without
apache. THANKS GUYS!
On Mar 11, 8:08 am, mdipierro mdipie...@cs.depaul.edu wrote:
We moved from cherrypy wsgiserver toRocket, by Timothy Farrell.
I
How is a database Null entry represented in python when using the
DAL? How can you query for null rows? How can you set them?
Is this the same as None?
And if you create a database row without setting a value for a column,
this is set to Null=None, right?
Thank you!
--
You received this
I'm running a background database processing task, and I only want to
have ONE task running so I don't have to worry about race conditions.
What is the best way to do this?
I run this task from a cron @reboot. It runs this script:
while True:
time.sleep(10)
process_queue()
I'm worried
I'm using hg tip and can't add a column to a table. It figures out
what to do, but doesn't alter the postgresql database. Then any
commands that need to use that column fail.
It was able to create the table in the first place, but cannot add a
column now that the table has been created. How
Here's what I propose:
In define_table, at this point:
if migrate:
sql_locker.acquire()
try:
t._create(migrate=migrate, fake_migrate=fake_migrate)
finally:
sql_locker.release()
At the end, it can read the database
1 - 100 of 104 matches
Mail list logo