Re: [web2py] display git version of my own web2py project

2016-08-08 Thread Niphlod
git command: > > os.system('git -C /path/to/myapp describe --abbrev=7 --dirty --always --tags > > git_ver.txt') > > session.gitver = open('/path/to/myapp/git_ver.txt').read() > > > > > On Monday, August 8, 2016 at 10:43:52 PM UTC+2, Niphlod wrot

[web2py] Re: select() and iterselect()

2016-08-08 Thread Niphlod
yep. if you use it once, iterselect() is more memory-savvy, although a BIT slower. For millions-rows sets, it's quite indispensable. On Monday, August 8, 2016 at 10:57:30 PM UTC+2, 黄祥 wrote: > > thanks simone for detail explaination, as i thought the iterselect() is > notreusable, the error disa

[web2py] Re: Form custom input errors

2016-08-08 Thread Niphlod
doesn't form.errors[fieldname] store the error ? On Monday, August 8, 2016 at 9:51:53 PM UTC+2, Gael Princivalle wrote: > > Hello. > > Is it possible in a custom form to display the individual input errors > like "Invalid email", if in the field of a table we have the validator > IS_EMAIL ? > >

Re: [web2py] display git version of my own web2py project

2016-08-08 Thread Niphlod
t 10:37:15 PM UTC+2, Niphlod wrote: >> >> if you just want web2py's version, use >> request.global_settings.web2py_version >> >> On Friday, July 29, 2016 at 9:56:43 PM UTC+2, Richard wrote: >>> >>> with no expiritation time >>> >>&

[web2py] Re: select() and iterselect()

2016-08-08 Thread Niphlod
the point in using iterselect() is that you have a SINGLE shot at iterating the results: speed comes from using the results returned as an iterator vs returning the big fat list. An iterator is inherently not reusable. tl;dr: if select() and iterselect() matched in functionality, why should we

Re: [web2py] Re: bounty pypi

2016-08-08 Thread Niphlod
t; do it. > > Richard > > On Wed, Aug 3, 2016 at 3:45 PM, Niphlod > > wrote: > >> The difficulty stands in findind a proper way to do it (and changing >> web2py in order to support it being used as a proper package). >> The latest attempt was a real nightmare

[web2py] Re: Problems with DAL and mysql

2016-08-08 Thread Niphlod
did you remember to commit() ? On Thursday, August 4, 2016 at 9:38:23 PM UTC+2, Morganti wrote: > > Hello everybody! > > I am developing using directly to Mysql. For testing with some scripts, I > was using python interpreter and defining only tables that it was needed. > But I have a problem

[web2py] Re: Query for dropdown list

2016-08-08 Thread Niphlod
first and foremost, you need to be able to have a Query that returns what you want. THEN, you can pass it to IS_IN_DB(). It's not so clear if the problem is you being unable to create such a Query or that you want a select to be dependant on a previous selection or if you have issues with IS_IN

[web2py] Re: Recommendations on where to store translation strings

2016-08-08 Thread Niphlod
uhm. a) T() just translates at the "view" level, i.e. when those are actually serialized ... passing over a module containing "choices" wouldn't ACTUALLY translate them . b) admin's management for T() strings is less than optimal with thousands of elements, and if in the need of a top-class "tr

[web2py] Re: Get Distinct dates

2016-08-08 Thread Niphlod
select(whatever, distinct=True) should seal the deal. On Monday, August 8, 2016 at 8:21:58 PM UTC+2, madhu nomula wrote: > > Hello, > > In Web2py database we have date entries. Need to get distinct dates and > bind to a dropdown control. But I am unable to get : > > Please find code below: > Con

[web2py] Re: Email not working

2016-08-08 Thread Niphlod
the "usual" issues are: - gmail's newer "secure apps" enabled by default which requires a two-step verification, which smtplib can't handle - tls or ssl enabled (or disabled) and the smtp endpoint not "in tune" with web2py's settings I'm also pretty sure that the traceback kinda steers towards

Re: [web2py] Re: Improvements for DevOps

2016-08-08 Thread Niphlod
using the --branch parameter doesn't really pose an issue on trunk being somewhat "broken". I just re-ran the command and had no issue on a clean system (with or without --shallow-submodules) I'd say it's a relatively old git subsystem the part to blame here. BTW: that is the "way" to save bandw

[web2py] Re: Ubuntu 16.04 - installation script stops

2016-08-08 Thread Niphlod
as soon as I get some free time this should become the new (and only) "official" script. Or as soon as somebody else takes that responsibility. https://gist.github.com/niphlod/8a13025001363657f0201b2a15dad41c On Monday, August 8, 2016 at 6:39:51 PM UTC+2, mweissen wrote: > >

[web2py] Re: MySQL DAL questions

2016-08-03 Thread Niphlod
if you need to access legacy tables, all you need - effectively - is not creating the tables: just parse the results to proper python-corresponding types. Same thing applies with inserting/updating: TINYINT, SMALLINT, INT are just integers...with a "forced" lower/upper limit. Those translates to

[web2py] Re: Designing security for different client types in the same app

2016-08-03 Thread Niphlod
Hello, data "guardian" here! Being the lonely DBA, I'm pretty much bored with this kind of stuff every day at work, managing nearly 2k databases ranging from simple q&a to financial to "top secret" data. Everything CAN be managed (various degrees of "complications"), but please note that there

Re: [web2py] display git version of my own web2py project

2016-08-03 Thread Niphlod
if you just want web2py's version, use request.global_settings.web2py_version On Friday, July 29, 2016 at 9:56:43 PM UTC+2, Richard wrote: > > with no expiritation time > > On Fri, Jul 29, 2016 at 3:54 PM, Richard Vézina > wrote: > >> You could also use web2py cache... >> >> :) >> >> Richard >>

[web2py] Re: DAL size limit for query?

2016-08-03 Thread Niphlod
a) step out apache as soon as you can b) what if you do it in a shell ? c) the only limit is the available memory d) if you hit that limit, and you don't need update_record() and delete_record(), you can save some with select(...cacheable=True) e) even more can be saved with executesql(as_dict=Tru

[web2py] Re: Using scheduler with facebook api calls

2016-08-03 Thread Niphlod
15 minutes is a LOT for expecting a reply from an external source: sure you can't reduce that timespan (maybe using "cascading" steps) ? Assume this when working with ANY task-queue solution: if your 15 minutes task fails at the 14th minute, you wasted 14 minutes for nothing. It holds especiall

[web2py] Re: Grid export csv

2016-08-03 Thread Niphlod
should be already fixed on master, anyway if you're in a hurry, set entity_quoring=False on the DAL line to make it work again (long story short, DAL now quotes everything by default and not every cog in the wheel was expecting that) On Monday, August 1, 2016 at 1:51:54 PM UTC+2, Kostas M wrote

[web2py] Re: bounty pypi

2016-08-03 Thread Niphlod
The difficulty stands in findind a proper way to do it (and changing web2py in order to support it being used as a proper package). The latest attempt was a real nightmare: a simple wrapper script was called to bootstrap a fresh directory from a tar(red) archive but it clearly wasn't (nor isn't)

[web2py] Re: Web2py scheduler linked postgres processes consuming too much memory

2016-07-28 Thread Niphlod
could you please try with psycopg2 ? On Thursday, July 28, 2016 at 6:53:10 PM UTC+2, Abhishek Ram wrote: > > I am using the default driver pg8000 > > On Thursday, July 28, 2016 at 7:47:41 PM UTC+5:30, Niphlod wrote: >> >> what driver are you using ? it's rather str

[web2py] Re: Amazon Redshift

2016-07-28 Thread Niphlod
BTW (funny things happen) today amazon announced that for RDS native backups/restore are available (RDS is PaaS for MSSQL, as redshift is for postgresql). Maybe they'll add the feature for redshift, too. On Tuesday, July 26, 2016 at 5:15:20 PM UTC+2, Alex Glaros wrote: > > tha

[web2py] Re: list of time zones

2016-07-28 Thread Niphlod
and that usecase should be covered by enabling the dropdown WITHOUT turning the autodetection. On Tuesday, July 26, 2016 at 7:54:39 PM UTC+2, icodk wrote: > > Thanks Niphold. This plugin is one of the best I know. It solves timezone > problem between user browser and server. In my case it is n

[web2py] Re: Scheduler runs

2016-07-28 Thread Niphlod
are you aware that a task that doesn't return a thing and doesn't fail won't store any scheduler_run table ? The rationale is that if you didn't return anything, you don't need the corresponding line in scheduler_run to retrieve the result. On Tuesday, July 26, 2016 at 8:28:32 PM UTC+2, Sagar S

[web2py] Re: Web2py scheduler linked postgres processes consuming too much memory

2016-07-28 Thread Niphlod
shifted to mysql and memory consumption is now stable. > > On Tuesday, July 19, 2016 at 12:24:27 AM UTC+5:30, Niphlod wrote: >> >> you're seeing a totally normal thing: postgresql spawns a different >> process for each connection. >> Those processes in linux are f

[web2py] Re: Using web2py with GreenPlum: Returning clause error

2016-07-28 Thread Niphlod
the returning statement is in /dialects/ :-P it definitely is a huge improvement over the "usual" lastval()/currval()/etc, BUT AFAIK it's not turned on by default. @giobar0, thoughts ? On Wednesday, July 27, 2016 at 9:21:04 AM UTC+2, Massimo Di Pierro wrote: > > grep RETURNING > > web2py/glu

[web2py] Re: web2py and jwt

2016-07-28 Thread Niphlod
ahem. a GET instead of a POST. On Wednesday, July 27, 2016 at 8:56:32 AM UTC+2, Abdu Adil wrote: > > (I used this link to > add jwt()) > > I want to use restful API with JWT, so I did this > > auth = Auth(db, host_names=myconf.get('host.names'),

[web2py] Re: show_if issue

2016-07-28 Thread Niphlod
I hate to barge in, but show_if works ONLY for very very very simple conditions: those conditions are translated at the best of possibilities to jquery selectors which are BY FAR not a complete uber-logic such as any DAL expression you throw at it. != True/False == True/False == value != va

[web2py] Re: start_time in web2py scheduler task seems to be ignored on Windows

2016-07-28 Thread Niphlod
confirmed, I can't reproduce. Which version of web2py are you on ? On Thursday, July 28, 2016 at 3:42:26 PM UTC+2, Niphlod wrote: > > next_run_time should definitely be there, no matter what... let me check. > > On Thursday, July 28, 2016 at 10:52:40 AM UTC+2, schnee wrote: >

[web2py] Re: start_time in web2py scheduler task seems to be ignored on Windows

2016-07-28 Thread Niphlod
> stop_time = None, #datetime >> timeout = 120, #seconds >> prevent_drift=False, >> immediate=False, >> repeats = 1, >> retry_failed = 0 >> ) >> >> Le mardi 26 juillet 2016 16:20:05

[web2py] Re: Improvements for DevOps

2016-07-28 Thread Niphlod
These are all fair points, and I tried to change it over the years by myself. Unfortunately, everything I attempted failed, but let's "mitigate" point by point. The uttely big disadvantage in retrieving web2py is the lack of a web2py package on pypi. Would that - finally - be available, pretty

[web2py] Re: Self-contradiction in the book regarding migration?

2016-07-26 Thread Niphlod
maybe a wrong choice of wording but "disabling migrations and enabling fake migrations" REALLY turns out to be activated with migrate=True, fake_migrate=True. migrate=False short-circuits at the highest level any migration logic, and it's the fastest "mode" to use on production, when you're - u

[web2py] Re: start_time in web2py scheduler task seems to be ignored on Windows

2016-07-26 Thread Niphlod
I'd say too "lets see the scheduler_run and scheduler_task table" for an example task. the logic behind picking tasks is the same without differences on Win and Linux, and if you use queue_task it's even more likely that there will be no differences between recent and not-so-recent scheduler ve

[web2py] Re: Amazon Redshift

2016-07-26 Thread Niphlod
unless pythonanywhere has some kind of direct integration, the simplest of the ways would be to backup incrementally the db on pythonanywhere and restore incrementally on redshift. ATM the pain-point on this simple architecture (the one you'd expect from two postgresql service providers) is tha

[web2py] Re: list of time zones

2016-07-26 Thread Niphlod
this does it too (see docs relevant on tz_nice_detector_widget) https://github.com/niphlod/w2p_timezone_plugin On Monday, July 25, 2016 at 11:02:22 PM UTC+2, icodk wrote: > > Thanks for the tips > > On Monday, July 25, 2016 at 7:50:25 PM UTC+2, mai...@gmail.com wrote: >> >&g

[web2py] Re: Inserting a new field to an old table - default value is not updated correctly

2016-07-26 Thread Niphlod
yep. "default" is something that gets evaluated in python at insert time. Given it takes also a callable, it can't be translated to a proper default constraint on the backend. When you alter the table, you should do so ALSO considering if it's full or empty, and/or that the new column would be

[web2py] Re: Field type list:string in SQLFORM.grid problem new entries.

2016-07-21 Thread Niphlod
"text" value="" /> > > > > > > > On Thursday, July 21, 2016 at 4:41:13 PM UTC+2, Niphlod wrote: >> >> is it really a big issue to have to press the '+' button to make another >> input appear >> >> On Thursday, J

[web2py] Re: Field type list:string in SQLFORM.grid problem new entries.

2016-07-21 Thread Niphlod
is it really a big issue to have to press the '+' button to make another input appear On Thursday, July 21, 2016 at 4:07:37 PM UTC+2, Alex Santana wrote: > > I updated the source to the version 2.14.6, the problem persists! > > I created a new application to test this isolated: > Model: > db

[web2py] Re: having issues with dates and DAL

2016-07-20 Thread Niphlod
On Wednesday, July 20, 2016 at 9:35:44 PM UTC+2, web2py...@gmail.com wrote: > > Actually found out i was using the non datetime version of the date in the > database... Thanks all for the help. > > Secondary question. after i get this question i run a query with a > following code: > > query =

[web2py] Re: having issues with dates and DAL

2016-07-20 Thread Niphlod
issue > is arising. I was wondering if anyone knows an intermediary step i can take > to avoid this issue or maybe a style change i can make... > > On Wednesday, July 20, 2016 at 11:35:31 AM UTC-4, Niphlod wrote: >> >> are the actual fields in the oracle backend a "D

Re: [web2py] Re: UWSGI root vs limited user.

2016-07-20 Thread Niphlod
; And i learned a new (to me) tool 'strace' to help myself. > > > > > On Wed, Jul 20, 2016 at 7:21 AM, Niphlod > > wrote: > >> me, proud? of ? >> >> On Wednesday, July 20, 2016 at 8:02:55 AM UTC+2, Michael M wrote: >>> >&g

[web2py] Re: having issues with dates and DAL

2016-07-20 Thread Niphlod
are the actual fields in the oracle backend a "DATE" field ? if so, pydal NEEDS to parse it correctly, no matter the format you want to display it. On Wednesday, July 20, 2016 at 5:06:06 PM UTC+2, web2py...@gmail.com wrote: > > What i've found is that the oracle has the date stored at 2016/04/12

[web2py] Re: UWSGI root vs limited user.

2016-07-20 Thread Niphlod
me, proud? of ? On Wednesday, July 20, 2016 at 8:02:55 AM UTC+2, Michael M wrote: > > Figured it out: > > Niplod you may be proud. I ran strace in the service: > > [Unit] > Description=uWSGI Emperor Service > After=syslog.target > > [Service] > EnvironmentFile=-/etc/sysconfig/uwsgi > ExecStartPre

[web2py] Re: having issues with dates and DAL

2016-07-20 Thread Niphlod
nope... don't go the wrong way. web2py/pydal stores dates and datetimes to native types, with the correct format in the database. Upon insertion and retrieval, it uses the format to translate the native type to the string representation the app wants. tl;dr : format is just for representation,

[web2py] Re: tootip in menu

2016-07-20 Thread Niphlod
^_^''' you can't create an attribute with a dash in python. if you want to use data, either use the ** notation (splatting a pre-built dictionary) or leverage the "special" data= argument that takes a dict (yep, you're not the only one using data- attributes...) span_attrs = {'_data-placemen

[web2py] Re: How active and 'professional' is web2py?

2016-07-19 Thread Niphlod
On Tuesday, July 19, 2016 at 8:24:43 PM UTC+2, Dave S wrote: > > > > On Tuesday, July 19, 2016 at 7:53:49 AM UTC-7, joeg816 wrote: >> >> Are there any marquee sites that are using it? When Rails was hot, they >> had a few big names. Same with PHP, etc. >> >

[web2py] Re: Web2py scheduler linked postgres processes consuming too much memory

2016-07-18 Thread Niphlod
you're seeing a totally normal thing: postgresql spawns a different process for each connection. Those processes in linux are fork()s, so even if you SEEM to notice a skyrocket in memory utilization summing all different processes (e.g. in "top"), in reality it's not sucking up every bit of RAM

[web2py] Re: Help with setting up apps with virutualenv and nginx

2016-07-15 Thread Niphlod
take this as a blueprint https://git.io/vwN4U On Thursday, July 14, 2016 at 5:00:20 PM UTC+2, Jason Solack wrote: > > Hello all, > > I am trying to get my head around setting up apps

[web2py] Re: Nginx & The Welcome App

2016-07-14 Thread Niphlod
the config file is pretty standard. You just need to use routes.py (or rename your 't4' to 'init') if you want your default application not being "welcome" On Thursday, July 14, 2016 at 12:44:26 AM UTC+2, pbreit wrote: > > I think the path to web2py is typically specified in the uwsgi ini file.

[web2py] Re: Link Columns getting cut off from sqlgrid (possible to make scrollable?)

2016-07-05 Thread Niphlod
the horizontal scrollbar should be there if you didn't tinker with the default styles. IMHO you'd be in any case better off showing the links column to the left rather than to the right. On Tuesday, July 5, 2016 at 5:15:37 PM UTC+2, Jordan Myers wrote: > > Hey everybody, > > so I'm using sqlgrid

[web2py] Re: Raspberry Pi: 'CommonDialect' object has no attribute 'quote_template'. How come?

2016-06-30 Thread Niphlod
download a stable release first and foremost there's no way to tell what On Thursday, June 30, 2016 at 6:42:59 AM UTC+2, Ben Lawrence wrote: > > Wait, no, I just downloaded the web2py software from the original > raspberry pi that I installed and functioned ok. I get the same error. Let >

[web2py] Re: SQL Server question, transactions remaining open

2016-06-29 Thread Niphlod
2016 at 3:22:42 PM UTC-4, Niphlod wrote: >> >> are you explicitely calling db.commit() at the end of your taks ? >> >> On Tuesday, June 28, 2016 at 6:36:02 PM UTC+2, Jason Solack wrote: >>> >>> Hello all, i am running an app that utilizes the scheduler an

[web2py] Re: One-Step Production Deployment: Who Moved the Cheese?

2016-06-29 Thread Niphlod
I'm working on revamping the scripts ... latest version (which one day or the other will be finalized) is ATM here https://gist.github.com/niphlod/8a13025001363657f0201b2a15dad41c On Wednesday, June 29, 2016 at 7:07:18 AM UTC+2, Ben Lawrence wrote: > > They changed upstart for Ubuntu

[web2py] Re: SQL Server question, transactions remaining open

2016-06-28 Thread Niphlod
are you explicitely calling db.commit() at the end of your taks ? On Tuesday, June 28, 2016 at 6:36:02 PM UTC+2, Jason Solack wrote: > > Hello all, i am running an app that utilizes the scheduler and i'm seeing > a lot of open transaction in SQL server with the last sql command being: > > IF @@TR

[web2py] Re: Use reserved keywords of mysql

2016-06-28 Thread Niphlod
if I'm not mistaken very recent releases quote everything by default, and even if the previous statement is incorrect, the entity_quoting argument is there for some time now. On Tuesday, June 28, 2016 at 7:06:49 PM UTC+2, pbreit wrote: > > Does the new DAL relax the reserved SQL words limitation

[web2py] Re: SSL error with CAS after upgrade to 32 bit python 2.7.10 on Windows (ActiveState python)

2016-06-28 Thread Niphlod
before doing that, make sure that you understand the security implications of trusting whatever certificate you get... On Tuesday, June 28, 2016 at 6:11:00 PM UTC+2, Yangbo Xu wrote: > > Hi Niphlod, > > I did face the certificate validation problem. It seems I need to dive a >

[web2py] Re: JSON / XML / other as response when raising HTTP error to restful request

2016-06-28 Thread Niphlod
or...given that the "big strange thing" is the status using the usual syntax with response.status = 409 just before before returning ? On Tuesday, June 28, 2016 at 4:44:44 PM UTC+2, Marlysson Silva wrote: > > The web2py would use generic views depending of extension of url. > Is it? > >

[web2py] Re: Rocket server and Windows POST

2016-06-20 Thread Niphlod
an hour long ? never had the necessity if instead we're talking about 5-10 minutes, not at all. On Monday, June 20, 2016 at 8:13:53 PM UTC+2, Dave S wrote: > > > > On Monday, June 20, 2016 at 2:24:49 AM UTC-7, Niphlod wrote: >> >> IMHO the problem is winsock. &

[web2py] Re: Is creating a token-based auth and still using auth and session globals possible?

2016-06-20 Thread Niphlod
jects with that token. Then on every API function that >>>> requires login perform a decoration function to look up a token that >>>> client >>>> sends and restore auth and session objects associated with it, and later >>>> use it in the function

[web2py] Re: Rocket server and Windows POST

2016-06-20 Thread Niphlod
IMHO the problem is winsock. On Friday, June 17, 2016 at 11:25:30 PM UTC+2, Dave S wrote: > > On Friday, June 17, 2016 at 7:34:18 AM UTC-7, Niphlod wrote: >> >> how can it be a rocket issue when the variable is the client and not the >> server ? >> > > By n

[web2py] Re: Rocket server and Windows POST

2016-06-17 Thread Niphlod
how can it be a rocket issue when the variable is the client and not the server ? On Friday, June 17, 2016 at 1:36:29 AM UTC+2, Dave S wrote: > > I'm a bad boy and still using the Rocket server that comes with web2py. > Today I ran into an interesting case. My client code sends a dump file to

[web2py] Re: db.commit() in module

2016-06-16 Thread Niphlod
in addition (or just using different words of what Anthony said) ONLY when you are in the web2py env in an HTTP request, web2py automatically commits at the end of a successul request and rolls back if some exceptions are raised, to ensure that EVERY operation you did for a request gets treated

[web2py] Re: db.commit() in module

2016-06-16 Thread Niphlod
not really. think a db.commit() as saving a file. if you need to have something that does the 3 operations atomically (i.e. either all three or none of them) you just commit() after the third one. if you instead need to consolidate what op1 does in fear that what op2 might fail (and you don't w

[web2py] Re: jquery-pjax

2016-06-14 Thread Niphlod
great, simple, done. On Tuesday, June 14, 2016 at 2:34:22 PM UTC+2, Carlos Cesar Caballero wrote: > > Hi everyone, have you any experience with > https://github.com/defunkt/jquery-pjax and web2py? it looks really > interesting. > > Greetings. > > -- > Este mensaje le ha llegado mediante el se

[web2py] Re: orderby with foreign key

2016-06-13 Thread Niphlod
there's no way around join(ing) theexternal table, use the external table column to sort and select only from the first table. On Sunday, June 12, 2016 at 7:51:17 AM UTC+2, Tribo Eila wrote: > > hi, > > using: for x in db(..).select(.. orderby=db.yyy.zzz): > row.append(TD(x.zzz.k

[web2py] Re: what is syntax for recursive join?

2016-06-13 Thread Niphlod
once you establish how a record gets tagged as "it has no children" you break from the loop. That being said DON'T use recursive selects for an adjacency listyou don't want to loose control over how many queries you launch. If you need, rebuild the structure in python from a single select,

[web2py] Re: migrate uwsgi + nginx --> twisted

2016-06-09 Thread Niphlod
are you talking about web2py ? web2py isn't really leveraging twisted features. Not sure if it'll sports better performances than uwsgi+nginx. that being said, nginx should still sit on top, proxying to the twisted process. Twisted has extensive docs on how to start it as a service, such as ht

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-08 Thread Niphlod
; bit tied since I'm using PythonAnywhere. > > -Andre > > > > > On Tuesday, June 7, 2016 at 4:17:59 PM UTC-4, Niphlod wrote: >> >> NP. perfectly kosher. For all matter and purposes, unless you need >> "transactional consistency" a separate db ma

Re: [web2py] Re: multi component form loaded in the same page

2016-06-07 Thread Niphlod
for future lurkers of threads, posting the code, or even better a minimal app, it's not something Anthony (or the occasional helper) asks for his own amusement...that simple requirement forces your brain to reevaluate all the steps, in a clean environment. 50% of the cases, your brain was stuck

[web2py] Re: Access the browser window.sessionStorage in my controller

2016-06-07 Thread Niphlod
the web is full of replies to your question tl;dr: sessionstorage is only valid in the current tab. to persist accross tabs, you need to leverage localstorage. On Tuesday, June 7, 2016 at 7:08:35 PM UTC+2, Jim S wrote: > > I'm not that well-versed in the workings of a browser. I'm wondering if

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Niphlod
liveconsole2#12039 - > ERROR - TICKER: error assigning tasks (9) > 2016-06-07 14:55:03,066 - web2py.scheduler.giles-liveconsole2#12039 - > ERROR - Error retrieving status > > On Tuesday, June 7, 2016 at 8:07:32 AM UTC-4, Niphlod wrote: >> >> uhm, then it'll be quite imp

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-07 Thread Niphlod
it may look like but that timeline doesn't emit the log according to the scheduler process seeing records (the DEBUG should output "looping..." and/or "sleeping..." at each iteration). Until I see it I can just ask direciton about how to replicate the issue, which I can't do. On Tuesday, June 7

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Niphlod
uhm, then it'll be quite impossible to fix it given the timeout is seemingly random. On Tuesday, June 7, 2016 at 1:19:07 PM UTC+2, Andre Kozaczka wrote: > > Yes, same lines. > > On Tuesday, June 7, 2016 at 5:54:37 AM UTC-4, Niphlod wrote: >> >> is the excep

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-07 Thread Niphlod
can be "several heartbeats before new tasks are actually assigned"... On Tuesday, June 7, 2016 at 3:54:41 AM UTC+2, Anthony wrote: > > On Monday, June 6, 2016 at 5:30:50 PM UTC-4, Niphlod wrote: >> >> okay but . >> """ >> Withimmediate

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-07 Thread Niphlod
is the exception raised in the same lines ? On Tuesday, June 7, 2016 at 4:32:45 AM UTC+2, Andre Kozaczka wrote: > > > Well. adding "sync_output=200" ended up working for tasks that were > just over the 300 second mark (where previously I was failing). I changed > the task length to 600 sec

[web2py] Re: How to properly set cache.action parameters in order to have different cache for logged-in and not?

2016-06-06 Thread Niphlod
it's kinda chicken-and-egg here, because your real trouble is that the unlogged user hits a page that you want to be cached client-side as long as he is not logged in. if you let it cache client-side, having the user returning to the same page to expect a different outcome is impossible. IMHO t

[web2py] Re: Output format of an SQL query

2016-06-06 Thread Niphlod
the oracle client really doesn't know anything about your database, it just spits what oracle has to tell. DAL is an "Abstraction", so to "abstract" a model, it needs the definition (the brain that designed the oracle table had it, it just translated to SQL rather than python) But let's put it

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-06 Thread Niphlod
the worker will check for new tasks as soon as possible (without waiting 5 cycles). """ to newbies could be more convoluted than the original statement...any suggestions ? On Monday, June 6, 2016 at 2:05:12 PM UTC+2, Anthony wrote: > > On Monday, June 6, 2016 at 6:44:43 AM UT

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-06 Thread Niphlod
hen do a db write) and end after a set period of time. I'm seeing > the problem when the dummy task takes over 300 seconds - anything less that > that the scheduler is able to update the task status after completion with > no errors. > > On Monday, June 6, 2016 at 6:31:40 AM UTC-

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-06 Thread Niphlod
pythonanywhere. When I > test it locally I see a bit of unresponsiveness but I think that's because > pythonanywhere has webworkers while locally there's only a single > non-threaded web2py process? > > Thanks for all the help Niphlod! Really appreciate it :). > >

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-06 Thread Niphlod
uhm. maybe it's not strictly clear but what immediate does is checking for new tasks (and the assigning/reassigning cycle) ASAP. There's no guarantee to do anything else (e.g. unavailable workers, single worker occupied processing a previous task, available workers but with a different group_na

[web2py] Re: error starting scheduler: error retreiving status

2016-06-06 Thread Niphlod
DOESN'T reexecute all the models, hence your issue. On Friday, June 3, 2016 at 11:09:18 PM UTC+2, Bart wrote: > > Thanks Niphlod, It works! > > I added > self.db_thread.executesql("set search_path to scheduler, auth, ... ;") > in gluon/scheduler.py

[web2py] Re: MySQL connection error after scheduled task completes

2016-06-06 Thread Niphlod
how many seconds does it take to be executed ? On Monday, June 6, 2016 at 3:46:12 AM UTC+2, Andre Kozaczka wrote: > > I'm getting the following error after my scheduled task completes: > > > Traceback (most recent call last): File > "/home/wdis/web2py/gluon/shell.py", line 273, in >run exec(

[web2py] Re: error starting scheduler: error retreiving status

2016-06-03 Thread Niphlod
y#L948) to set the same search path. Please be aware that even if it seems to work, support for it is not assured (so use at your own risk) On Friday, June 3, 2016 at 7:19:02 PM UTC+2, Bart wrote: > > Hi Niphlod, > > Normally i just put a record in the scheduler_task table with a

[web2py] Re: Modification in version 2.14.6 not documented ?

2016-06-03 Thread Niphlod
is this on grid or smartgrid ? On Friday, June 3, 2016 at 7:15:33 PM UTC+2, omicron wrote: > > I have just seen this modification for parameter 'exportclasses' in grids. > The manual say "If you pass a dict like > dict(xml=False, html=False) > > you will disable the xml and html export formats",

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-03 Thread Niphlod
riday, June 3, 2016 at 7:39:44 PM UTC+2, Mark Smith wrote: > > Thanks for the response :). I want to explain my situation a bit more if > that's alright with you Niphlod (I'm a newbie at web dev haha). You're > right, I think I can use a simple ajax request to do it inst

[web2py] Re: Is there a way to make scheduler tasks be picked by workers up even quicker?

2016-06-03 Thread Niphlod
long story short, no. You can get better "pick-up-times" (the time that elapses from when you queue the task to when it's started) with the redis version of the scheduler but in any case the worst possible scenario won't drop under "heartbeat" which is 3 seconds. Got it, would be wonderful if

[web2py] Re: error starting scheduler: error retreiving status

2016-06-03 Thread Niphlod
what happens when you try to queue a task from the app ? AFAIK I'd be eager to know how can it work if there is no "public" schema, unless you tinkered with scheduler's table definitions On Friday, June 3, 2016 at 4:57:23 PM UTC+2, Bart wrote: > > Addition: > > I am using several schema's in the

[web2py] Re: how do I call stored procedure containing parameters?

2016-06-01 Thread Niphlod
for simple stored procedures, returning something, executesql() is the way to go. On Wednesday, June 1, 2016 at 1:05:53 PM UTC+2, Charles tenorio wrote: > > hi I like Call stored procedure containing parameters? > thanks! > -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] Re: auth.signature and Format ....issue

2016-06-01 Thread Niphlod
at a minimum you need to extend auth BEFORE referencing it. and where is your auth.define_tables() call ? On Wednesday, June 1, 2016 at 3:00:50 PM UTC+2, Steve wrote: > > Hi, > > I am trying to extend the Auth_user tabel with a dropdown field. > > I have them working but if i try to add the "Auth

[web2py] Re: What's the proper way of sharing sessions between two web2py apps served through different domains?

2016-05-31 Thread Niphlod
subdomains are allowed. Different domains are not. Doing what you are doing is "permitted", although it's surely not a best practice. On Tuesday, May 31, 2016 at 3:47:10 PM UTC+2, Lisandro wrote: > > Hi Niphlod, thanks for your answer. > > I've realised that m

[web2py] Re: What's the proper way of sharing sessions between two web2py apps served through different domains?

2016-05-31 Thread Niphlod
afaik cookies can't be sent to multiple domains. CORS is needed. IMHO it's correct that web2py doesn't provide a way to support that. On Tuesday, May 31, 2016 at 2:46:45 PM UTC+2, Lisandro wrote: > > I have *two web2py apps that share the same db, and they also share the > session*. > Both *apps

[web2py] Re: validate_and_update : I don't know what's going on ?

2016-05-30 Thread Niphlod
npe! validate_and_update is a method of a Query, not of a Table! (you may have scrambled it with validate_and_insert()...) What you need to do is db(db.uperson.auth_user==1).validate_and_update(age=101) On Monday, May 30, 2016 at 3:34:48 PM UTC+2, Pierre wrote: > > Hi, > > here it is : t

[web2py] Re: Problem with Scheduler on pythonanywhere

2016-05-30 Thread Niphlod
that error comes only on two codepaths: tables that are missing columns (and/or have different column types) and database locks. try dropping tables, letting scheduler recreate them and see what happens. On Monday, May 30, 2016 at 1:53:04 PM UTC+2, Scott Hunter wrote: > > I have an appliance host

[web2py] Re: Setting up the scheduler, and letting it run from a certain point of time

2016-05-29 Thread Niphlod
ost:8001/taportaltest/appadmin/update/db/scheduler_run/9> > auto-insert > <http://localhost:8001/taportaltest/appadmin/update/db/scheduler_task/2> > COMPLETED 2016-05-28 16:19:38 2016-05-28 16:19:40 "inserted" None > taship.iiit.a... > 10 > <http://loca

[web2py] Re: LOAD with ajax=True not working with SSL

2016-05-27 Thread Niphlod
check your SSL virtual server stanza: there's probably something different in it. From web2py standpoint, http or https makes no difference at all. On Friday, May 27, 2016 at 10:02:59 AM UTC+2, Tom Øyvind Hogstad wrote: > > Hi I enabled SSL on my site and a web2py form.grid embedded in a page >

[web2py] Re: Error during scheduled job

2016-05-27 Thread Niphlod
nope, it's a mysql gotcha. it closes the connection without telling it did so. Try issuing a query every once in a while. On Friday, May 27, 2016 at 3:56:34 AM UTC+2, Andre Kozaczka wrote: > > I'm seeing this error occasionally from my scheduler: > > File "/usr/lib/python2.7/ssl.py", line 341,

[web2py] Re: File permission issues when running script as scheduler

2016-05-27 Thread Niphlod
* > * File > "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", line > 746, in insert* > * raise e Error: (, SystemExit(1,)) * > > Once again, this part works just fine when executed from a controller. > > > On Thursday, May 26, 2016 at 6:24

[web2py] Re: web2py and Spatial / GIS support

2016-05-26 Thread Niphlod
I don't want to push anyone away but if the underlying statement is "I need this ready to go" and a library-framework-whatever doesn't contain it, then there's really nothing anyone can do. Nobody ever said that web2py is a silver bullet (nor is it django, flask, express, sails, rails, cakephp,

[web2py] Re: File permission issues when running script as scheduler

2016-05-26 Thread Niphlod
if your files are created by the www-data process and are not for anyone else to touch, the problem will rise. you can't expect an app running in the same permission env on www-data to behave (permission-wise) as one running on your user ("fivestar", I guess?) study your permission (start with

<    1   2   3   4   5   6   7   8   9   10   >