[web2py] Re: scheduler error no such column: scheduler_task.broadcast

2020-10-18 Thread Jim S
Can you manually add the broadcast field to your scheduler_task table in the database? -Jim On Saturday, October 17, 2020 at 6:54:53 PM UTC-5, Ramos wrote: > > Hello i moved my app to opalstack from webfaction. > I have a sqlite db. I deleted all files inside databases folder with > .table ext

[web2py] Re: scheduler error no such column: scheduler_task.broadcast

2020-10-18 Thread Jose C
I'm not sure if this is different with sqlite but with postgres and mysql, you would do the following: 1) delete all the .table files in the databases directory 2) set migrate=True and fake_migrate=True (also make sure lazy_tables is False) 3) start your app with the scheduler option enabled. Yo

[web2py] Re: Scheduler error using python3.6 and psycopg2

2018-08-31 Thread Antonio Salazar
I separately had the same problem recently and created a github issue . If this got implemented please close that issue. On Sunday, July 15, 2018 at 2:17:25 PM UTC-5, Massimo Di Pierro wrote: > > Good catch. Will implement this. > > On Wednesday, 20

[web2py] Re: Scheduler error using python3.6 and psycopg2

2018-07-15 Thread Massimo Di Pierro
Good catch. Will implement this. On Wednesday, 20 June 2018 14:45:54 UTC+2, Bart wrote: > > I have found a workaround for this issue. > The root cause is probably something in the pyDal connector or psycopg2 or > threading. I leave the finding of that to the experts. > > The workaround is to add

[web2py] Re: Scheduler error using python3.6 and psycopg2

2018-06-20 Thread Bart
I have found a workaround for this issue. The root cause is probably something in the pyDal connector or psycopg2 or threading. I leave the finding of that to the experts. The workaround is to add code to gluon/scheduler.py to test the connection before the rest of the Scheduler.send_heartbeat()

Re: [web2py] Re: Scheduler error

2016-11-23 Thread Niphlod
phlod >> Data: 23/11/16 13:08 (GMT+00:00) >> Para: web2py-users >> Assunto: [web2py] Re: Scheduler error >> >> when you say "fail" you mean the status of the task itelf is set as >> FAILED or that your db.emails.status is 'failed' ? &

Re: [web2py] Re: Scheduler error

2016-11-23 Thread Niphlod
alaxy. > > Mensagem original > De: Niphlod > > Data: 23/11/16 13:08 (GMT+00:00) > Para: web2py-users > > Assunto: [web2py] Re: Scheduler error > > when you say "fail" you mean the status of the task itelf is set as FAILED > or that your

RE: [web2py] Re: Scheduler error

2016-11-23 Thread ramstein74
The task itself is set as failed! Enviado a partir do meu smartphone Samsung Galaxy. Mensagem original De: Niphlod Data: 23/11/16 13:08 (GMT+00:00) Para: web2py-users Assunto: [web2py] Re: Scheduler error when you say "fail" you mean the status of the task itelf

[web2py] Re: Scheduler error

2016-11-23 Thread Niphlod
when you say "fail" you mean the status of the task itelf is set as FAILED or that your db.emails.status is 'failed' ? On Wednesday, November 23, 2016 at 1:13:10 PM UTC+1, Ramos wrote: > > web2py 2.14.3 > > 2016-11-23 12:07 GMT+00:00 António Ramos > >: > >> i think the problem is in response.ren

[web2py] Re: Scheduler error

2016-11-23 Thread António Ramos
web2py 2.14.3 2016-11-23 12:07 GMT+00:00 António Ramos : > i think the problem is in response.render... because i change it to a > simple email with no template rendering and it works.. > > 2016-11-23 11:51 GMT+00:00 António Ramos : > >> what can be wrong with the code in my scheduler.py ? >> *mo

[web2py] Re: Scheduler error

2016-11-23 Thread António Ramos
i think the problem is in response.render... because i change it to a simple email with no template rendering and it works.. 2016-11-23 11:51 GMT+00:00 António Ramos : > what can be wrong with the code in my scheduler.py ? > *montlyreport* is called by a task with the same name > I have 2 users i

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-12-14 Thread kenny c
I think it has to do with csvkit since loading big file creates this issue. Thank you as always! Let's go! Web2PY! On Monday, December 14, 2015 at 1:45:25 PM UTC-5, kenny c wrote: > > Sorry for late reply and thank you so much, Niphlod! > > I am still playing with Scheduler, so I didn't know how

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-12-14 Thread kenny c
Sorry for late reply and thank you so much, Niphlod! I am still playing with Scheduler, so I didn't know how I should use it. One more question, I am testing the scheduler to write a csv file from reading JSON formatted data, The scheduler stops at one point, I get "STOPPED" on the terminal

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-24 Thread Niphlod
please remove any print statement and why are you importing modules inside the function ? On Tuesday, November 24, 2015 at 1:15:15 PM UTC+1, kenny c wrote: > > Just tested with psycopg and same error. > = > ERROR:web2py.scheduler.postit#20382:Error retrieving status > Exception in t

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-24 Thread kenny c
Just tested with psycopg and same error. = ERROR:web2py.scheduler.carat-diamond#20382:Error retrieving status Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/home/www-data/web2py/gl

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-23 Thread Niphlod
not to point fingers around, but can you try installing psycopg2 ? it'll override pg8000 that showed here and there some obscure bugs: pscopg2 is certainly more solid. If the same happens with psycopg2, can we see the actual function queued (or a function that replicates this behaviour) ? BTW:

[web2py] Re: Scheduler error: Exception in thread Thread-1 and connection is closed

2015-11-21 Thread kenny c
I think there is timeout issue on the scheduler and I am not sure which one it is.. Seems to me that the Scheduler stops if it takes longer than 5 minutes in regardless of the value of timeout saved in the task row. On Saturday, November 21, 2015 at 8:12:05 PM UTC-5, kenny c wrote: > > HI, I am

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Pardon me earlier messaeg. I copied wrong code. *#models/scheduler.py* def send_mail(to, subject, message, cc=None, bcc=None, attachments=None): """ This module is called by scheduler. mail is queued by scheduler. """ if cc is None: cc = [] if bcc is

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
NP. I got another way to catch failed mail/task. *#models/scheduler.py* def send_mail(to, subject, message, cc=None, bcc=None, attachments=None): """ This module is called by scheduler. mail is queued by scheduler. """ if cc is None: cc = [] if bcc i

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Niphlod
no. On Thursday, August 28, 2014 10:26:42 AM UTC+2, Prasad Muley wrote: > > Okay. > I am using 2.3 . I can't upgrade it because Company decided to use 2.3 > only. > Is there anyway to access current task id in 2.3? > > > > On Thu, Aug 28, 2014 at 1:47 PM, Niphlod > > wrote: > >> what version ar

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Okay. I am using 2.3 . I can't upgrade it because Company decided to use 2.3 only. Is there anyway to access current task id in 2.3? On Thu, Aug 28, 2014 at 1:47 PM, Niphlod wrote: > what version are you using ?! W2P_TASK is available from 2.4.1. > > > On Thursday, August 28, 2014 9:30:28 AM U

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Niphlod
what version are you using ?! W2P_TASK is available from 2.4.1. On Thursday, August 28, 2014 9:30:28 AM UTC+2, Prasad Muley wrote: > > Hi Niphlod, > I need to get current task's id. I saw your sample scheduler example > on niphlod_w2p_scheduler_tests >

Re: [web2py] Re: Scheduler error

2014-08-28 Thread Prasad Muley
Hi Niphlod, I need to get current task's id. I saw your sample scheduler example on niphlod_w2p_scheduler_tests I did it in same way but got error. *#models/scheduler.py* def send_mail(to, subject, message, cc

Re: [web2py] Re: Scheduler error

2014-08-26 Thread Niphlod
I'd strongly advise you to read the section on the book about migrations and fixing broke migrations. If you're starting now with the scheduler, please do the following: - delete all databases/*_scheduler_*.table files - delete scheduler_worker, scheduler_tasks, scheduler_run table from your back

Re: [web2py] Re: Scheduler error

2014-08-26 Thread Prasad Muley
Hi, I tried to access db.scheduler_run table but it is giving me following error in web2py shell and app admin UI. *OperationalError: (1054, "Unknown column 'scheduler_run.scheduler_task' in 'field list'")* On Tue, Aug 26, 2014 at 1:04 PM, Niphlod wrote: > there's yet a scheduler_task table

Re: [web2py] Re: Scheduler error

2014-08-26 Thread Prasad Muley
Thanks. It works. On Tue, Aug 26, 2014 at 1:04 PM, Niphlod wrote: > there's yet a scheduler_task table in the database. Fix migrations in the > usual way, or set Scheduler(db,,migrate=False) to avoid the error. > > > On Tuesday, August 26, 2014 8:58:06 AM UTC+2, Prasad Muley wrote: >> >> Hi

[web2py] Re: Scheduler error

2014-08-26 Thread Niphlod
there's yet a scheduler_task table in the database. Fix migrations in the usual way, or set Scheduler(db,,migrate=False) to avoid the error. On Tuesday, August 26, 2014 8:58:06 AM UTC+2, Prasad Muley wrote: > > Hi, > I've web2py 2.3 version. I tried to use scheduler for mail sending. > I

[web2py] Re: Scheduler: Error retrieving status?

2014-01-12 Thread Niphlod
nope, it doesn't, but auth.user_id defaults to None if there is no logged-in user. Not sure what happened without having the complete app code, however the scheduler tables are not meant to be altered, e.g. with common_fields, so it definitely should have been those to make the scheduler not beh

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread User
Ok that appears to have been the problem. Getting rid of db._common_fields.append(standard_fields) fixed it. Didn't hone in on the exact problem but maybe it's because I had not null on created_by, modified_by fields which defaulted to auth.user_id. Does a scheduled task even have a concept

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread User
I created a bare bones app and the scheduler seems to work without error. Not really sure what's happening with the problem app but if I had to guess I'm thinking it might be related to using db._common_fields.append(standard_fields) where standard_fields is a table with fields such as date_cr

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread User
postgresql. Also my app which uses same database works and I can see the tables and the row in scheduler_task table from appadmin On Friday, January 10, 2014 9:57:25 AM UTC-5, Niphlod wrote: > > what db are you using ? > that error usually pops up when the scheduler can't access the scheduler_*

[web2py] Re: Scheduler: Error retrieving status?

2014-01-10 Thread Niphlod
what db are you using ? that error usually pops up when the scheduler can't access the scheduler_* tables. On Friday, January 10, 2014 2:09:26 AM UTC+1, User wrote: > > I'm just getting started with the scheduler and I'm getting an error when > I start it on windows 7: > > C:\www\web2py>python w

Re: [web2py] Re: scheduler error message

2013-01-14 Thread Martin Weissenboeck
Thank you, I understand now. The reason is: I have two web2py installations, one for develepment and one for production. If some part of the code works as expected I copy it from the development system to the production system and therefore I wanted to let the code know where it is. 2013/1/14 Nip

Re: [web2py] Re: scheduler error message

2013-01-14 Thread Niphlod
yep. Scheduler's function are called OUTSIDE the web2py process, like in a shell, so there is a "fake" request that doesn't hold ALL the keys of a normal request. Namely, request.env by default holds only you can "inspect" available keys of the "fake" request in the shell itself web2py

Re: [web2py] Re: scheduler error message

2013-01-14 Thread Martin Weissenboeck
I have found: In db.py I have something like sn = request.env.server_name If this line is called by the scheduler sn gets the value None 2013/1/14 Niphlod > ? > > > On Sunday, January 13, 2013 9:37:38 PM UTC+1, mweissen wrote: > >> Solved. >> I have tried to use request.env.server_name in db.p

Re: [web2py] Re: scheduler error message

2013-01-14 Thread Niphlod
? On Sunday, January 13, 2013 9:37:38 PM UTC+1, mweissen wrote: > > Solved. > I have tried to use request.env.server_name in db.py > > 2013/1/13 Martin Weissenboeck > > >> Now I have tried to reduce this problem: >> >> There is only one function in "myscheduler": >> >> myscheduler = Scheduler (db,

Re: [web2py] Re: scheduler error message

2013-01-13 Thread Martin Weissenboeck
Solved. I have tried to use request.env.server_name in db.py 2013/1/13 Martin Weissenboeck > Now I have tried to reduce this problem: > > There is only one function in "myscheduler": > > myscheduler = Scheduler (db, dict( > testmail=testmail, > )) > > And testmail is: > > def testmail(te

Re: [web2py] Re: scheduler error message

2013-01-13 Thread Martin Weissenboeck
Now I have tried to reduce this problem: There is only one function in "myscheduler": myscheduler = Scheduler (db, dict( testmail=testmail, )) And testmail is: def testmail(text='mytext'): res = send_email( to='myaddr...@gmail.com', subject="subject:

Re: [web2py] Re: scheduler error message

2013-01-13 Thread Martin Weissenboeck
Repeats: 0=unlimitedRetry Failed: -1=unlimitedPeriod: secondsTimeout: secondsSync Output: update output every n sec: 0=never Times Run: Times Failed: Tiemout:300 seconds. The called functions needs about 2 seconds to complete. 2013/1/13 Niphlod > did you try to raise the timeout ? > > > On Sunda

[web2py] Re: scheduler error message

2013-01-13 Thread Niphlod
did you try to raise the timeout ? On Sunday, January 13, 2013 2:43:12 PM UTC+1, mweissen wrote: > > The scheduler calls two diffent functions. > In bothes the scheduler_run table contains: > > Traceback (most recent call last): > File "/home/www-data/web2py/gluon/scheduler.py", line 214, in exe