[web2py] Re: Scheduler Replacement
Thanks for your answer!, I'm a poor worker. lol. Really, really thanks, I'm tempted to take the road of doing some "interface" code to emulate the same functionality the scheduler currently does but using mrq.io library/framework as a backend... that to avoid changing the current code within the project, but I'm currently trying to see if it is feasible, and how much time that would take. Thanks again Niphlod for the hints and info; it would be awesome if the scheduler limits where documented somewhere (I would do it but I've never done it before); anyway, thanks a lot :) El viernes, 23 de noviembre de 2018, 2:20:59 (UTC-6), Niphlod escribió: > > jokes aside, yeah, you definitely hit scheduler's limits, or, for better > saying, limits using a relational database as a queue table. > web2py's scheduler can still be optimized, and I feel that 30k tasks are > manageable, if they are spread throughout the day (20 tasks a minute if > math is not failing me) > Managing 15-20 workers is not a problem with a good database backend, > 30ish or more is asking for disasters to happen, and that's why > redis_scheduler was born. > The redis backed one moves to redis the heavy concurrency part, which is > the scheduler_worker table and the polling algo for looking for new tasks, > but it doesn't move EVERYTHING out of the database. > 60-80 workers is probably the limit for redis_backed. > Both of them are prolly less than 2k lines of code and they use DAL and > redis, but nothing else from the standard library so they're definitely > good, but not on par with "specialized" alternatives. > > One "grin" of the implementation is that it forks a new process every > task, and that's for a basic design principle others do not enforce which > is to terminate a long running process going into timeout (and that's > because python can't kill a thread, just a process). But that's a problem > for people running 40 tasks per second, not 20 a minute. > > Things to look out for when you reach high numbers like you (i.e. you can > see if it helps "staying with the scheduler"): > - trim the scheduler_task regularly (having 1m rows in the scheduler_task > table, if you do not need them for reporting, can definitely bring down > performances) > - same deal for scheduler_run (do you need the result, and if you need it, > do you need for how much time?!) > - create indexes on it-s- the scheduler_task table (one on status, > assigned_worker_name helps the workers, on stop_time, next_run_time and > status helps the ticker) > > took that out of the table, you can quite easily jump on a different ship > (my advice would be to look at rq before celery, but YMMV) which are HUGE > projects. > > The only problem you may have is that if you use the same backend to store > results for your tasks (because they're needed) you *may* hit the same > limits, i.e. you may have your backend not sized up for the work your apps > need to do. > > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Scheduler Replacement
TL;DR : Do you guys know or has experience with an alternative scheduler to web2py's one that you would recommend? we use features such as scheduling tasks at a specific time, repetitions, timeouts, and check the task current state. Any further comments, advice and experience is really appreciated. Details: We've beeng experiencing several issues with web2py's scheduler limits, our scenario currently looks something like: - 30,000+ tasks queued daily. - Around 40+ workers distributed into four different servers (somewhere between 10 workers per server): We do this because of the nature of the tasks we are distributing, we need them to be run on a specific server located somewhere in the world that has access to do what we need. - A centralized database that holds tasks+runs (PostgreSQL) - A centralized REDIS that manages the scheduler (with redis_scheduler.py module wihtin gluon/contrib/redis_scheduler.py) We previously used web2py's (default) non-redis scheduler but we found the total workers that the database supported was around ~13-15 (too few for our usage scenario, above that number of workers started to get deadlocks from the database and ticker would fail to assign tasks) so we tried using redis_scheduler which worked (with one really weird bug we found a way to overcome but have found no fix yet) for some time until we needed more workers, now we are having issues, again with the relational database that holds the tasks (scheduler_task and scheduler_run tables, database connection gets closed after sometime when we have somewhere between 50+ workers); So I can only see that we need to replace web2py's scheduler on our application to support more workers and bring back stability to our project's hunger for workers nature... Do anyone of you guys know or has experience with an alternative scheduler? I've seen several options (rabbit-mq, python-rq, mrq, so on); but I'm not sure about the limitations of those schedulers... any further comments are really appreciated. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Issues with Scheduler (suddenly multiple tickers appear)
So I narrowed down the issue, it happends when a worker detects he should be the ticker and does an update on all other workers to set them false, an oracle error happens (about deadlock) and it fails, the error "Error coordinating ticker" appears and then it continues, but lines later it COMMITS and makes itself a ticker... and everyone wants to be a ticker and scheduler dies and fire starts and i suffer in pain, so the fix should be removing the catch that prints the message "Error coordinating ticker" so that when the whole operation fails it rolls back and not commits itself to be a ticker.. anyways issue is open now: https://github.com/web2py/web2py/issues/1787 El miércoles, 4 de octubre de 2017, 8:49:22 (UTC-6), Boris Aramis Aguilar Rodríguez escribió: > > Hi, I've been recently using lots of tasks scheduled on a server so I had > to use several workers to deal with the queue, currently I'm using 45 > workers. > > Somewhere between 12 hours after starting the 45 workers, suddenly tasks > start accumulating in the queue and workers are alive (they report a > heartbeat), and the only thing i've noticed is that from the 45 workers > more than 1 becomes the ticker (the flag is_ticker is True for several of > them), so if I discovered that if I set to False the flag for all workers > except for one then tasks start being assigned again correctly, but it > happends again after some time. > > I'm not sure how to find where the bug is, so that is why I come here > asking for your guidance :) > > Thanks! > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Issues with Scheduler (suddenly multiple tickers appear)
Hi, I've been recently using lots of tasks scheduled on a server so I had to use several workers to deal with the queue, currently I'm using 45 workers. Somewhere between 12 hours after starting the 45 workers, suddenly tasks start accumulating in the queue and workers are alive (they report a heartbeat), and the only thing i've noticed is that from the 45 workers more than 1 becomes the ticker (the flag is_ticker is True for several of them), so if I discovered that if I set to False the flag for all workers except for one then tasks start being assigned again correctly, but it happends again after some time. I'm not sure how to find where the bug is, so that is why I come here asking for your guidance :) Thanks! -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: web2py scheduler with huge output or return values always timeout (even if the task finishes)
Please do try :) I might be wrong :P and it could be something else; but I tried to narrow it down as much as I could. El feb 29, 2016 2:26 PM, "Niphlod" escribió: > uhm, not sure about that though. the order of operations in the scheduler > respects the docs, and even if the bugreport has the 128k statement, the > docs don't report it let me try. > > On Monday, February 29, 2016 at 9:14:41 PM UTC+1, Boris Aramis Aguilar > Rodríguez wrote: >> >> It happends not only while printing but also when returning values on a >> function as noted on the example :) so yes i do avoid printing but this >> also happens when returning more than 128kb of data (as noted by the bug >> reports) due to the fact (it seems) that the max data a process can >> comunicate to other via pipes is around that limit so that is the >> underlying reason. >> El feb 29, 2016 2:07 PM, "Niphlod" escribió: >> >>> don't know if it's documented on the book but nevertheless there has >>> been a few times it popped up on this group. As output is buffered, >>> especially on Windows but on unixes flavoured OSes as well, the "printed" >>> output should be limited. >>> Of course it never has been a real issue because if you need to return >>> something you shouldn't NEVER EVER use print. >>> And because you should be already accustomed to NEVER EVER using print >>> in any web2py application, first because print doesn't get you anything and >>> second because if you need huge prints you're probably sidestepping a >>> correct usage of the logging library. >>> Anyhow, I'll submit right away a PR on the book with a solid note about >>> it. >>> >>> On Monday, February 29, 2016 at 7:41:41 PM UTC+1, Boris Aramis Aguilar >>> Rodríguez wrote: >>>> >>>> Hi, there is an issue driving me crazy with the web2py scheduler: >>>> >>>> If you return something that has a huge size then it will always >>>> timeout; even if the scheduler task correctly finishes. Let me explain with >>>> an example: >>>> >>>> def small_test(): >>>> s = 's'*1256018 >>>> another_s = s >>>> #print s >>>> #print another_s >>>> #print 'FINISHED PROCESS' >>>> return dict(s = s, another_s = another_s, f = 'finished') >>>> >>>> small_test is the function to execute, as you can see a string full of >>>> 's' 1256018 times is. Simple >>>> >>>> So when you enqueue the scheduler every time the output is the same: >>>> http://prnt.sc/a9iarj (screenshot of the TIMEOUT) >>>> >>>> As you can see from the screenshot, the process actually finished; >>>> while logging the scheduler output shows the following: >>>> >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: work to do 1405 >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new scheduler_run >>>> record >>>> INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task 1405 >>>> "small_test" portal/default.small_test >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: new task allocated: >>>> portal/default.small_test >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: task starting >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:task started >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task report: >>>> COMPLETED >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: result: {"s": >>>> "ss$ >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >>>> heartbeat (RUNNING) >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >>>> heartbeat (RUNNING) >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >>>> heartbeat (RUNNING) >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >>>> heartbeat (RUNNING) >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >>>> heartbeat (RUNNING) >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:freeing workers >>>> that have not sent heartbeat >>>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >>>> heartbea
Re: [web2py] Re: web2py scheduler with huge output or return values always timeout (even if the task finishes)
It happends not only while printing but also when returning values on a function as noted on the example :) so yes i do avoid printing but this also happens when returning more than 128kb of data (as noted by the bug reports) due to the fact (it seems) that the max data a process can comunicate to other via pipes is around that limit so that is the underlying reason. El feb 29, 2016 2:07 PM, "Niphlod" escribió: > don't know if it's documented on the book but nevertheless there has been > a few times it popped up on this group. As output is buffered, especially > on Windows but on unixes flavoured OSes as well, the "printed" output > should be limited. > Of course it never has been a real issue because if you need to return > something you shouldn't NEVER EVER use print. > And because you should be already accustomed to NEVER EVER using print in > any web2py application, first because print doesn't get you anything and > second because if you need huge prints you're probably sidestepping a > correct usage of the logging library. > Anyhow, I'll submit right away a PR on the book with a solid note about it. > > On Monday, February 29, 2016 at 7:41:41 PM UTC+1, Boris Aramis Aguilar > Rodríguez wrote: >> >> Hi, there is an issue driving me crazy with the web2py scheduler: >> >> If you return something that has a huge size then it will always timeout; >> even if the scheduler task correctly finishes. Let me explain with an >> example: >> >> def small_test(): >> s = 's'*1256018 >> another_s = s >> #print s >> #print another_s >> #print 'FINISHED PROCESS' >> return dict(s = s, another_s = another_s, f = 'finished') >> >> small_test is the function to execute, as you can see a string full of >> 's' 1256018 times is. Simple >> >> So when you enqueue the scheduler every time the output is the same: >> http://prnt.sc/a9iarj (screenshot of the TIMEOUT) >> >> As you can see from the screenshot, the process actually finished; while >> logging the scheduler output shows the following: >> >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: work to do 1405 >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new scheduler_run >> record >> INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task 1405 >> "small_test" portal/default.small_test >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: new task allocated: >> portal/default.small_test >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: task starting >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:task started >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task report: >> COMPLETED >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: result: {"s": >> "ss$ >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:freeing workers >> that have not sent heartbeat >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:freeing workers >> that have not sent heartbeat >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording >> heartbeat (RUNNING) >> DE
[web2py] web2py scheduler with huge output or return values always timeout (even if the task finishes)
Hi, there is an issue driving me crazy with the web2py scheduler: If you return something that has a huge size then it will always timeout; even if the scheduler task correctly finishes. Let me explain with an example: def small_test(): s = 's'*1256018 another_s = s #print s #print another_s #print 'FINISHED PROCESS' return dict(s = s, another_s = another_s, f = 'finished') small_test is the function to execute, as you can see a string full of 's' 1256018 times is. Simple So when you enqueue the scheduler every time the output is the same: http://prnt.sc/a9iarj (screenshot of the TIMEOUT) As you can see from the screenshot, the process actually finished; while logging the scheduler output shows the following: DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: work to do 1405 DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new scheduler_run record INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task 1405 "small_test" portal/default.small_test DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: new task allocated: portal/default.small_test DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: task starting DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:task started DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:new task report: COMPLETED DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: result: {"s": "ss$ DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:freeing workers that have not sent heartbeat DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:freeing workers that have not sent heartbeat DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:freeing workers that have not sent heartbeat DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:recording heartbeat (RUNNING) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:task timeout DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: recording task report in db (TIMEOUT) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475: status TIMEOUT, stop_time 2016-02-29 11:56:52.393706, run_result {"s": "sss$ INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:task completed (TIMEOUT) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#24475:looping... INFO:web2py.scheduler.PRTALONENETLAPP-SRV#24475:nothing to do As you can see there is a TaskReport object in the queue with a COMPLETED status (I know this because I read the scheduler.py code of web2py) So I'm pretty sure the task finishes quite fast but then it hangs. So I did another test, that doesn't directly use the scheduler but only calls the executor method from the scheduler and usess process; just like the scheduler would: from gluon.scheduler import Task from gluon.scheduler import executor t = Task(app='portal', function='small_test', timeout = 120) import logging logging.getLogger().setLevel(logging.DEBUG) import multiprocessing queue = multiprocessing.Queue(maxsize = 1) out = multiprocessing.Queue() t.task_id = 123 t.uuid = 'asdfasdf' p = multiprocessing.Process(target=executor, args=(queue, t, out)) p.start() p.join(timeout = 120) p.is_alive() when the join finishes waiting (2 minutes) if you check for p.is_alive() it always returns True; but when you do a queue.get() and then instantly check for p.is_alive() the process finishes! So i noticed the problem is from multiprocessing library, due to the fact that it can't handle lots of data from a queue (which seems kind of strange for my case, but I don't know how it is implemented); anyways i found this bug: http://bugs.python.org/issue8237 and http://bugs.python.org/issue8426 The
[web2py] Using basic auth (email username) seems not to be working
Currently I'm trying to create a service for my application as follows: auth.settings.allow_basic_login = True @auth.requires_login() def test(): from gluon.serializers import json return json((auth.user, 'hello')) But I've tried to do authentication using the browser as follows: https://u...@domain.com:password@172.1.1.1/api/test.json (which of course seems broken since @ doesn't seem valid) So I tried the scaped version: https://user%40domain.com:password@172.1.1.1/api/test.json but still, I'm being redirected to the login URL, like if basic auth had no effect. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Scheduler Tasks show TICKER: error assigningt task (0) and task never start
Sorry, this is FIXED; it was a self-introduced bug by overriding insert code within DAL's broken Oracle implementation. Thanks for your time! El viernes, 30 de octubre de 2015, 10:45:02 (UTC-6), Boris Aramis Aguilar Rodríguez escribió: > > Since like two months ago Oracle. > > El viernes, 30 de octubre de 2015, 10:27:58 (UTC-6), Niphlod escribió: >> >> what backend are you using ? >> >> On Friday, October 30, 2015 at 4:36:09 PM UTC+1, Boris Aramis Aguilar >> Rodríguez wrote: >>> >>> Hi >>> >>> I've just re-started my scheduler and suddenly it didn't worked, so i >>> ran it on a shell with debug and the following errors appeared: >>> >>> http://pastebin.com/M7sQE3sR >>> >>> Im unsure of this errors, i've checked that the scheduler databases are >>> actually defined (I can access them from appadmin) but still when I restart >>> the scheduler the same set of errors come up and no task is set to ASSIGNED >>> or RUNNING state. >>> >>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks... >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (0) >>> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording >>> heartbeat (ACTIVE) >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (1) >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (2) >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (3) >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (4) >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (5) >>> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >>> tasks (6) >>> >>> >>> Any help i would be very thankfull. >>> >> -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Scheduler Tasks show TICKER: error assigningt task (0) and task never start
Since like two months ago Oracle. El viernes, 30 de octubre de 2015, 10:27:58 (UTC-6), Niphlod escribió: > > what backend are you using ? > > On Friday, October 30, 2015 at 4:36:09 PM UTC+1, Boris Aramis Aguilar > Rodríguez wrote: >> >> Hi >> >> I've just re-started my scheduler and suddenly it didn't worked, so i ran >> it on a shell with debug and the following errors appeared: >> >> http://pastebin.com/M7sQE3sR >> >> Im unsure of this errors, i've checked that the scheduler databases are >> actually defined (I can access them from appadmin) but still when I restart >> the scheduler the same set of errors come up and no task is set to ASSIGNED >> or RUNNING state. >> >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks... >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (0) >> DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording >> heartbeat (ACTIVE) >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (1) >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (2) >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (3) >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (4) >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (5) >> ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning >> tasks (6) >> >> >> Any help i would be very thankfull. >> > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Scheduler Tasks show TICKER: error assigningt task (0) and task never start
Hi I've just re-started my scheduler and suddenly it didn't worked, so i ran it on a shell with debug and the following errors appeared: http://pastebin.com/M7sQE3sR Im unsure of this errors, i've checked that the scheduler databases are actually defined (I can access them from appadmin) but still when I restart the scheduler the same set of errors come up and no task is set to ASSIGNED or RUNNING state. DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:Assigning tasks... ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (0) DEBUG:web2py.scheduler.PRTALONENETLAPP-SRV#6366:recording heartbeat (ACTIVE) ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (1) ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (2) ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (3) ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (4) ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (5) ERROR:web2py.scheduler.PRTALONENETLAPP-SRV#6366:TICKER: error assigning tasks (6) Any help i would be very thankfull. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Bug on DAL OracleAdapter
Steps to reproduce: db.define_table('atable', Field('longtext', 'text'))#this makes longtext to be a clob in oracle database for i in range(1, 100): db.atable.insert(longtext=str(i)) rows = db(db.atable.id>0).select() for r in rows: print r.longtext #this fails with the following exception Traceback (most recent call last): File "", line 1, in ProgrammingError: LOB variable no longer valid after subsequent fetch As I was trying to fix the error I found that LOB variables if not called .read() they can't be accessed afterwards, so this only happened when you selected something that returned more than 1 row. I finally found the issue in *OracleAdapter method _fetchall* def _fetchall(self): if any(x[1]==cx_Oracle.LOB for x in self.cursor.description): return [tuple([(c.read() if type(c) == cx_Oracle.LOB else c) \ for c in r]) for r in self.cursor] else: return self.cursor.fetchall() So this method calls the read() method when it detects that the data is cx_Oracle.LOB data type... but as long as the latest version of cx_Oracle CLOB is not the same as LOB so this code fails for CLOB data (text fields in web2py dal and Oracle backend). So, finally the bugfix is to detect for CLOB and LOB data types and call the read() method The BugFix def _fetchall(self): if any(x[1]==cx_Oracle.LOB or x[1]==cx_Oracle.CLOB for x in self. cursor.description): return [tuple([(c.read() if type(c) == cx_Oracle.LOB else c) \ for c in r]) for r in self.cursor] else: return self.cursor.fetchall() -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Oracle CLOB/text insert adapter issues
Hi :) I've just managed to fix my issue by adding/modifying a couple of methods of the *pydal.adapters.oracle.OracleAdapter class*; everything seems to be working for me def _insert(self, table, fields): table_rname = table.sqlsafe if fields: keys = ','.join(f.sqlsafe_name for f, v in fields) r_values = dict() def value_man(f, v, r_values): if f.type is 'text': r_values[':' + f.sqlsafe_name] = self.expand(v, f.type) return ':' + f.sqlsafe_name else: return self.expand(v, f.type) values = ','.join(value_man(f, v, r_values) for f, v in fields) return ('INSERT INTO %s(%s) VALUES (%s);' % (table_rname, keys, values), r_values) else: return (self._insert_empty(table), None) def insert(self, table, fields): query, values = self._insert(table,fields) try: if not values: self.execute(query) else: self.execute(query, values) except Exception: e = sys.exc_info()[1] if hasattr(table,'_on_insert_error'): return table._on_insert_error(table,fields,e) raise e if hasattr(table, '_primarykey'): mydict = dict([(k[0].name, k[1]) for k in fields if k[0].name in table._primarykey]) if mydict != {}: return mydict id = self.lastrowid(table) if hasattr(table, '_primarykey') and len(table._primarykey) == 1: id = {table._primarykey[0]: id} if not isinstance(id, (int, long)): return id rid = Reference(id) (rid._table, rid._record) = (table, None) return rid El martes, 4 de agosto de 2015, 1:00:59 (UTC-6), Niphlod escribió: > > ok, we were discussing the same thing over at pydal's repo to address > another issue, that is closely related . > https://github.com/web2py/pydal/issues/155 > > On Monday, August 3, 2015 at 8:57:44 PM UTC+2, Boris Aramis Aguilar > Rodríguez wrote: >> >> I've found the following: >> >> To insert a text using the cx_Oracle driver directly if you do something >> like >> >> import cx_Oracle >> connection = cx_Oracle.connect('connectionstring') >> >> cursor = connection.cursor() >> >> p = '' >> for i in range(1,1): >> p += str(i) >> >> sss = "INSERT INTO >> ipvpn_route_table(read_datetime,ip_vpn,route_table,destinations) VALUES >> (NULL,6,'" + p + "','" + p + "')" >> cursor.execute(sss) >> >> It fails with the same error as the web2py traceback >> >> DatabaseError: ORA-01704: string literal too long >> >> The correct way to do it is by passing it with parameters (and it works with >> any ammount of characters below 4GB of clob data) as follows: >> >> import cx_Oracle >> connection = cx_Oracle.connect('... connection string') >> >> cursor = connection.cursor() >> >> p = '' >> for i in range(1,1): >> p += str(i) >> >> sss = "INSERT INTO >> ipvpn_route_table(read_datetime,ip_vpn,route_table,destinations) VALUES >> (NULL,6,:FOO,:BAR)" >> cursor.execute(sss, FOO=p, BAR=p) >> >> >> >> El lunes, 3 de agosto de 2015, 9:51:16 (UTC-6), Boris Aramis Aguilar >> Rodríguez escribió: >>> >>> Hi, >>> >>> I've been currently working with Oracle as a database backend, I have >>> found one issue that I highly suspect has to do with the DAL Adapter; when >>> you use web2py text fields they get mapped into CLOB with oracle database >>> backend (as you can see on the OracleAdapter code) the issue is dealing >>> with text longer than 4k characters. Oracle doesn't support a typical >>> insert with more than 4k characters dealing with a CLOB data type, because >>> it treats it as a string and strings can't be more than 4k characters long. >>> So for example dealing with a table like >>> >>> db.define_table('atable', Field('longtext', 'text')) >>> >>> db.atable.insert(longtext=somelongtext) #This fails with the following >>> exception >>> >>> File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 691, in >>> insert >>> ret = self._db._adapter.insert(self, self._listify(fields)) >>> File "/var/www/web2py/g
[web2py] Re: Oracle CLOB/text insert adapter issues
I've found the following: To insert a text using the cx_Oracle driver directly if you do something like import cx_Oracle connection = cx_Oracle.connect('connectionstring') cursor = connection.cursor() p = '' for i in range(1,1): p += str(i) sss = "INSERT INTO ipvpn_route_table(read_datetime,ip_vpn,route_table,destinations) VALUES (NULL,6,'" + p + "','" + p + "')" cursor.execute(sss) It fails with the same error as the web2py traceback DatabaseError: ORA-01704: string literal too long The correct way to do it is by passing it with parameters (and it works with any ammount of characters below 4GB of clob data) as follows: import cx_Oracle connection = cx_Oracle.connect('... connection string') cursor = connection.cursor() p = '' for i in range(1,1): p += str(i) sss = "INSERT INTO ipvpn_route_table(read_datetime,ip_vpn,route_table,destinations) VALUES (NULL,6,:FOO,:BAR)" cursor.execute(sss, FOO=p, BAR=p) El lunes, 3 de agosto de 2015, 9:51:16 (UTC-6), Boris Aramis Aguilar Rodríguez escribió: > > Hi, > > I've been currently working with Oracle as a database backend, I have > found one issue that I highly suspect has to do with the DAL Adapter; when > you use web2py text fields they get mapped into CLOB with oracle database > backend (as you can see on the OracleAdapter code) the issue is dealing > with text longer than 4k characters. Oracle doesn't support a typical > insert with more than 4k characters dealing with a CLOB data type, because > it treats it as a string and strings can't be more than 4k characters long. > So for example dealing with a table like > > db.define_table('atable', Field('longtext', 'text')) > > db.atable.insert(longtext=somelongtext) #This fails with the following > exception > > File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 691, in > insert > ret = self._db._adapter.insert(self, self._listify(fields)) > File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 731, > in insert > raise e > DatabaseError: ORA-01704: string literal too long > > And reading trough several forums I found that this error appears on CLOB > insertion when you do a tipycal insert. > https://community.oracle.com/thread/1068414?start=0&tstart=0 > > So i guess OracleAdapter is trying to achieve a typical insertion when it > shouldn't as it has to deal with CLOB logic. > > I think I could fix the problem but I'm not really sure if someone can help > me out with a hint of some kind. > > Thanks! > > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Oracle CLOB/text insert adapter issues
Hi, I've been currently working with Oracle as a database backend, I have found one issue that I highly suspect has to do with the DAL Adapter; when you use web2py text fields they get mapped into CLOB with oracle database backend (as you can see on the OracleAdapter code) the issue is dealing with text longer than 4k characters. Oracle doesn't support a typical insert with more than 4k characters dealing with a CLOB data type, because it treats it as a string and strings can't be more than 4k characters long. So for example dealing with a table like db.define_table('atable', Field('longtext', 'text')) db.atable.insert(longtext=somelongtext) #This fails with the following exception File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 691, in insert ret = self._db._adapter.insert(self, self._listify(fields)) File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 731, in insert raise e DatabaseError: ORA-01704: string literal too long And reading trough several forums I found that this error appears on CLOB insertion when you do a tipycal insert. https://community.oracle.com/thread/1068414?start=0&tstart=0 So i guess OracleAdapter is trying to achieve a typical insertion when it shouldn't as it has to deal with CLOB logic. I think I could fix the problem but I'm not really sure if someone can help me out with a hint of some kind. Thanks! -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Oracle SQL/DAL Bug Issue on Alter Table
Hi all, I'm currently working on web2py with an Oracle Database backend (Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production) but I'm having an issue with the generated Oracle command for altering a table. I had a table definition as follows (in web2py): db.define_table('device', Field('hostname', 'string', requires=IS_NOT_EMPTY(), label=T('Hostname')), Field('device_location', 'string', label=T('Location')), ... more stuff) and updated it db.define_table('device', Field('hostname', 'string', requires=IS_NOT_EMPTY(), label=T('Hostname')), Field('device_location', 'string', label=T('Location')), Field('dashboard_category', 'reference dashboard_category', label = T('Category')), ... more stuff) so the DAL generated the following statement for altering the device table: ALTER TABLE device ADD dashboard_category NUMBER, ADD CONSTRAINT device_dashboa__constraint FOREIGN KEY (dashboard_category) REFERENCES dashboard_category (id) ON DELETE CASCADE; (whis is wrong!!!) It had to generate ALTER TABLE device ADD dashboard_category NUMBER ADD CONSTRAINT device_dashboa__constraint FOREIGN KEY (dashboard_category) REFERENCES dashboard_category (id) ON DELETE CASCADE; It added an extra comma that makes the command to fail. I now have to manually update the database with a fake_migrate help but i guess this is a bug -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: DB2 database issue with Clob types
I've just fixed it :D The thing is that those parameters (that fix up the issue with clob types and pyodbc) can be passed trough the web2py connection string, so it is now as follows: db_tivoli = DAL('db2:pyodbc://driver=DB2;hostname=IP_OR_HOSTNAME;database=DATABASENAME;\ uid=USER;pwd=PASSWORD;port=50005;LONGDATACOMPAT=1;LOBMAXCOLUMNSIZE=10485875', migrate=False, pool_size=0, attempts=1) I'm so happy :) El lunes, 4 de mayo de 2015, 10:56:49 (UTC-6), Boris Aramis Aguilar Rodríguez escribió: > > Hi, web2py data type is text; > > I see in this post: > https://groups.google.com/forum/#!searchin/web2py/ODBC$20data$20type$20-99/web2py/6xxz8KXBXCY/pcpdiPQh1K4J > that it is the normal behavior of web2py, to map text-clob on IBM DB2 > databases. > > Also on the same post they propose a solution editing db2cli.ini file but > I don't know how to configure db2cli.ini (I mean, I know how to open it, > where it is but I don't understand which alias should I put on the file) > > Any help I will really appreciate it. > > Thanks! > > El sábado, 25 de abril de 2015, 5:24:41 (UTC-6), Paolo Valleri escribió: >> >> you should provide us more info... >> which web2py type are you using that is mapped to CLOB field? >> web2py/pyodbc version >> >> Paolo >> >> On Friday, April 24, 2015 at 6:17:53 PM UTC+2, Boris Aramis Aguilar >> Rodríguez wrote: >>> >>> ('ODBC data type -99 is not supported. Cannot read >>> column LDTEXT.', 'HY000') >>> >>> Hi, Im currently accesing a DB2 database (readonly) that is used by >>> another application, my connection string is as follows: >>> >>> db_tivoli = >>> DAL('db2:pyodbc://driver=DB2;hostname=24.50.5.5;database=MAXDB71;uid=on_usr;pwd=pass.;port=50005', >>> >>> pool_size=1, db_codec='latin1', migrate=False) >>> >>> and everything was going fine until I added a clobdata type to web2py >>> data code >>> >>> And now I'm getting the error I referenced above (sorry I couldnt paste >>> it in order, Im on my phone) Any hints I would appreciate it :) >> >> -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: DB2 database issue with Clob types
Hi, web2py data type is text; I see in this post: https://groups.google.com/forum/#!searchin/web2py/ODBC$20data$20type$20-99/web2py/6xxz8KXBXCY/pcpdiPQh1K4J that it is the normal behavior of web2py, to map text-clob on IBM DB2 databases. Also on the same post they propose a solution editing db2cli.ini file but I don't know how to configure db2cli.ini (I mean, I know how to open it, where it is but I don't understand which alias should I put on the file) Any help I will really appreciate it. Thanks! El sábado, 25 de abril de 2015, 5:24:41 (UTC-6), Paolo Valleri escribió: > > you should provide us more info... > which web2py type are you using that is mapped to CLOB field? > web2py/pyodbc version > > Paolo > > On Friday, April 24, 2015 at 6:17:53 PM UTC+2, Boris Aramis Aguilar > Rodríguez wrote: >> >> ('ODBC data type -99 is not supported. Cannot read >> column LDTEXT.', 'HY000') >> >> Hi, Im currently accesing a DB2 database (readonly) that is used by >> another application, my connection string is as follows: >> >> db_tivoli = >> DAL('db2:pyodbc://driver=DB2;hostname=24.50.5.5;database=MAXDB71;uid=on_usr;pwd=pass.;port=50005', >> >> pool_size=1, db_codec='latin1', migrate=False) >> >> and everything was going fine until I added a clobdata type to web2py >> data code >> >> And now I'm getting the error I referenced above (sorry I couldnt paste >> it in order, Im on my phone) Any hints I would appreciate it :) > > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] DB2 database issue with Clob types
('ODBC data type -99 is not supported. Cannot read column LDTEXT.', 'HY000') Hi, Im currently accesing a DB2 database (readonly) that is used by another application, my connection string is as follows: db_tivoli = DAL('db2:pyodbc://driver=DB2;hostname=24.50.5.5;database=MAXDB71;uid=on_usr;pwd=pass.;port=50005', pool_size=1, db_codec='latin1', migrate=False) and everything was going fine until I added a clobdata type to web2py data code And now I'm getting the error I referenced above (sorry I couldnt paste it in order, Im on my phone) Any hints I would appreciate it :) -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] LOAD component, timeout and passing variables / arguments
Hi, currently I'm using LOAD and components on a project. The problem is that when using a timeout for auto-reloading the component then the current view state is lost, let me explain: 1. A controller called performance_matrix.py has a method index(); that method receives request.vars and depending on received variable x it displays a different type of data. 2. The view performance_matrix/index.html is quite simple, because it has just the LOAD inside of it to load the component that displays a matrix depending on an x variable. {{extend 'layout.html'}} {{block center}} {{=LOAD('performance_matrix','index.load',ajax=True, times = "infinity", timeout=1000*60)}} {{end}} 3. The file performance_matrix/index.load contains the view of the component, it has a form that when you change values on it it makes a POST to the server with the new x variable that changes what the view displays. 4. The problem is, that when timeout within the load happends, then requested variable x is lost so the state of the displayed view gets back to default I don't want this behavior; i want the timeout to happend and send whatever vars I currently have in the state of the component. Any help i would appreciate it. Thanks! -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: dal retrieve one element from auth_user results in exception when none found
Everything is fine... it was a mistake on my behalf sorry :S it seems that i pulled some pre-compiled pyc stuff from a partner im working with that made some weird side effects; now all .pyc files are in my gitignore :) Thanks! Boris Aramis Aguilar Rodríguez Technology Projects Entrepreneur IT Services (502) 5633 1847 m...@borisaguilar.com http://borisaguilar.com 2014-02-04 Anthony : > On Tuesday, February 4, 2014 10:30:25 AM UTC-5, Massimo Di Pierro wrote: >> >> Should have been: >> >> a = db.auth_user(username = 'admin') >> > > The __call__ method of Table can also take a query as the first argument, > so the original version should work as well (in fact, it works when I try > it, on a slightly more recent version than Boris). > > Anthony > > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/PQTTd-RWQEM/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.