Use mysql, less head-ache for the scheduler.

> On Mar 22, 2017, at 10:20 AM, Ramos <[email protected]> wrote:
> 
> I had the same problem this week and did all 
> 
> Please drop the scheduler_worker table from the database and remove the file 
> *_scheduler_worker.table from the databases/ folder of your application, then 
> set migrate to True (a single request with migrate=True will suffice). The 
> table will be recreated properly and the error will go away.
> 
> Now i get the error
> <class 'psycopg2.ProgrammingError'> relation "scheduler_worker" does not exist
> 
> 
> any help?
> 
> 
> Em quarta-feira, 8 de março de 2017 14:05:46 UTC, Ben Lawrence escreveu:
> forget it, I am going back to mysql. 
> 
> On Sunday, March 5, 2017 at 4:48:30 AM UTC-8, Ben Lawrence wrote:
> OK,
> I have two machines, one with web2py+nginx (machine A) and the other with 
> postgresql (machine B)
> 
> On machine A:
> I check migrate = 0
> I delete all the scheduler tables
> I check that I deleted all the scheduler tables
> 
> On machine B:
> I delete all the scheduler tables in postgres
> 
> On machine A:
> I check that there are no scheduler tables.
> I reboot it
> 
> I check that there are no scheduler tables
> I turn on migrate = 1
> There are now scheduler tables.
> I go to scheduler tables in web2py admin, scheduler_tasks show new tasks that 
> have since completed,
> scheduler_run show new tasks that have completed,
> but scheduler_worker has error:
> Traceback (most recent call last):
>   File 
> "/home/www-data/web2py/applications/temperature/controllers/appadmin.py:select",
>  line 270, in select
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/objects.py", line 
> 2045, in select
>     return adapter.select(self.query, fields, attributes)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 746, in select
>     return self._select_aux(sql, fields, attributes, colnames)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 727, in _select_aux
>     return processor(rows, fields, colnames, cacheable=cacheable)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 305, in parse
>     for row in rows
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 229, in _parse
>     value = self.parse_value(value, fit, ft, blob_decode)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 196, in parse_value
>     return self.parser.parse(value, field_itype, field_type)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/parsers/__init__.py", 
> line 101, in parse
>     return self.registered[field_itype](value, field_type)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/parsers/__init__.py", 
> line 76, in __call__
>     return self.call(value, field_type)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/parsers/__init__.py", 
> line 73, in _call
>     return self.f(self.parser, value)
>   File "/home/www-data/web2py/gluon/packages/dal/pydal/parsers/base.py", line 
> 129, in _json
>     raise RuntimeError('json data not a string')
> RuntimeError: json data not a string
> 
> On Friday, August 26, 2016 at 4:41:38 PM UTC-7, Ben Lawrence wrote:
> Thanks, I must have got the sequence wrong.
> 
> On Thursday, August 25, 2016 at 12:05:38 PM UTC-7, Niphlod wrote:
> if you get any error with __tmp is because you didn't drop tables on the 
> backend AND .table files before hitting the app with migrate=True.
> 
> On Thursday, August 25, 2016 at 6:53:07 PM UTC+2, Ben Lawrence wrote:
> Hi Niphlod,
> I deleted all the scheduler tables , created a new database and then rebooted 
> with DAL(..migrate=True..) yet still get this error
> column "worker_stats__tmp" is of type json but expression is of type text'
> 
> using postgresql 9.4 on raspberry pi.
> In 
> http://stackoverflow.com/questions/32501027/casting-text-type-column-to-json-type-in-postgresql
>  
> <http://stackoverflow.com/questions/32501027/casting-text-type-column-to-json-type-in-postgresql>
> there is a mention of recasting. If this is a solution, would you know how I 
> can incorporate this into web2py?
> thanks,
> Ben
> 
> 
> On Wednesday, May 27, 2015 at 12:53:40 PM UTC-7, Niphlod wrote:
> Please drop the scheduler_worker table from the database and remove the file 
> *_scheduler_worker.table from the databases/ folder of your application, then 
> set migrate to True (a single request with migrate=True will suffice). The 
> table will be recreated properly and the error will go away.
> 
> The error comes from the fact that the adapter chooses "at connection time" 
> the "nicest" column type to play with based on the backend version. The 
> definition of the scheduler_worker table has a "json" Field, that on 
> postgresql 9.3 maps to a "json" column, while on 9.1 was a "text" column, 
> hence the misbehaviour if you don't drop and re-create the table.
> 
> 
> -- 
> Resources:
> - http://web2py.com <http://web2py.com/>
> - http://web2py.com/book <http://web2py.com/book> (Documentation)
> - http://github.com/web2py/web2py <http://github.com/web2py/web2py> (Source 
> code)
> - https://code.google.com/p/web2py/issues/list 
> <https://code.google.com/p/web2py/issues/list> (Report Issues)
> --- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "web2py-users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/c3DXeJ8aq-Y/unsubscribe 
> <https://groups.google.com/d/topic/web2py/c3DXeJ8aq-Y/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to