Issue resolved. The source of all trouble was that the Scheduler uses the
same db connection as the task it executes. Thus output updates (print
'!clear!%(progress)s' % progress) changes the connection status, randomly,
hence the strange exceptions.
Suggestion: explicitly mention this as a
How about generating most of the pages and serving them as static content
(e.g. templates that have nothing to render, just plain HTML); then having
some templates that really have stuff that needs to be rendered and
processed (e.g. a contact form + a POST handler) ?
--
Resources:
-
Hello guys,
Recently updated from w2p 2.2.1 to 2.8.2 as I was advised; now random
errors on database inserts started to raise for stuff that worked on the
old version (2.2.1). Tracebacks of the two errors:
This is the most common one:
File /home/www-data/web2py/gluon/scheduler.py, line 238,
On Monday, December 16, 2013 2:46:00 AM UTC+2, Massimo Di Pierro wrote:
Do you user virtual fields? Are you doing migrations while the scheduler
tasks are running. This is strange because it is a very fundamental piece
of web2py code that has not changed in long time:
Massimo, thanks
Hello all,
I follow a simple video-tutorial (http://vimeo.com/27478796); so I create a
model scheduler.py with this content:
def f():
t = time.ctime()
open('/tmp/tasks', 'w').write(t + '\n')
return f
from gluon.scheduler import Scheduler
Scheduler(db, dict(our_func=f))
After
Niphlod, yes, that was it !!
It was not in the db.py but there was a 0.py with 'settings.migrate = True'
(this is not my app, I was just asked to hack there to fix an issue).
An easy workaround might be to also set fake_migrations to True
(fake_migrate_all=True in DAL() creation) and copy and
Leonel, thanks so much for the advice!
On Wednesday, December 4, 2013 10:28:43 PM UTC+2, Leonel Câmara wrote:
Instead of rerunning the task with period, schedule new tasks every time
you need to go get the user's friends and have many scheduler workers if
there's a chance you will have to
On Wednesday, December 4, 2013 10:28:43 PM UTC+2, Leonel Câmara wrote:
Instead of rerunning the task with period, schedule new tasks every time
you need to go get the user's friends
I guess I have to create a record into the scheduler_task table, with some
reasonable values, and then the
On Thursday, December 5, 2013 8:40:28 AM UTC+2, Yassen D. wrote:
On Wednesday, December 4, 2013 10:28:43 PM UTC+2, Leonel Câmara wrote:
Instead of rerunning the task with period, schedule new tasks every time
you need to go get the user's friends
I guess I have to create a record
On Thursday, December 5, 2013 9:33:15 AM UTC+2, Yassen D. wrote:
... I get an exception saying that table socialjack.scheduler_task does
not exist (traceback below). But the table IS there, I can see it in the db
admin interface and on the MySQL console ...
Not really, the table is shown
On Monday, December 2, 2013 6:20:54 PM UTC+2, Massimo Di Pierro wrote:
The scheduler should do what you need. You can start many workers to
manage the load
Thanks, Massimo! I upgraded to 2.8.2 with minor issues (MySQL date fields
seem to have been mapped to strings and now to datetime
Massimo, thanks a lot for your help!
I will upgrade right away then. (I have very limited time, so I was afraid
to break things.)
My comments:
(a) We need to get the import process run instantly on user UI action (link
click). Couple of seconds later is okay, but half a minute later is not
Hello guys,
I am trying to help with a web2py application (web2py v. 2.2.1, ancient,
yes) that needs an urgent patch as follows:
There is a controller function that fetches all facebook friends of the
user and stores them in the db (mysql). Currently this is done plainly in
that function,
13 matches
Mail list logo