Re: [web2py] matching a Week day in query

2016-11-02 Thread Dave S
On Wednesday, November 2, 2016 at 1:47:20 AM UTC-7, Manuele wrote: > > Il 02/11/16 09:27, icodk ha scritto: > > Ex. on Manday I want to select all record where the Monday field is true. > > maybe something like that? > > from datetime import dateimport calendarmy_date = date.today() > > There's

[web2py] "psycopg2.DatabaseError: SSL SYSCALL error: Software caused connection abort" error occurs regularly

2016-11-02 Thread Spokes
I'm running a script which uses pydal outside of the web2py environment, in the following manner: from gluon import DAL, Field from gluon.validators import IS_LENGTH, IS_IN_SET, IS_EMPTY_OR, IS_URL, IS_INT_IN_RANGE db = DAL(.., pool_size = 1, check_reserved=['all'], lazy_tables = False,

[web2py] Re: problem with sqleditable

2016-11-02 Thread Vic Ding
Hi Peter, The code is from the editPO controller. Tried the writable = True, but no luck. It seems to me like the fields must be readable and writable at the same time to be properly inserted. Might just have to show all the fields and hide some of them using javascript. Or rewrite the

[web2py] Re: scheduler creates "zombie" processes

2016-11-02 Thread Niphlod
I'd say there are a LOT of strange things going on on your system, since you're reporting several different issues that nobody ever faced and all in the last week. zombie processes shouldn't be there unless you killed improperly a worker process. Python can't really do anything about it, and

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Martin Weissenboeck
Thank you, but it did not work, because the module program does not use the models. More details: The module contains a small smtp-server. This program writes incoming emails to a table "db.emails". This part works very well. Now I want to start a scheduler action to analyze each email and to

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Niphlod
if the scheduler is already defined in the db, just use Scheduler(the_uri. migrate=False) . there shouldn't be issues with queuing tasks . On Wednesday, November 2, 2016 at 11:17:00 AM UTC+1, mweissen wrote: > > Thank you, but it did not work, because the module program does not use > the

[web2py] Re: DEADLOCKs between two or more scheduler worker

2016-11-02 Thread Niphlod
ahem until "it makes sense" any modification (and discussion about it) doesn't really help anyone ^_^ . The fact that you have 4 workers and a congestion problem gives me the hint that your db is on the lower side of the needed specs for a normal server. These kind of issues starts to

[web2py] scheduler creates "zombie" processes

2016-11-02 Thread Erwn Ltmann
Dear all, I'm astonished about a lot of processes as sub process of scheduler worker are not finished. pstree -p 16731 > > bash(16731)---python2.7(24545)-+-python2.7(24564)---{python2.7}(24565) >|-python2.7(24572)-+-python2.7(1110) >

Re: [web2py] .git file in gluon/packages/dal/.git

2016-11-02 Thread Niphlod
uhm ... what ? On Tuesday, November 1, 2016 at 7:10:16 PM UTC+1, Richard wrote: > > I agree with you Simone, but should it stay there in the build for pydal > only? > > Richard > > On Tue, Nov 1, 2016 at 1:45 PM, Niphlod > wrote: > >> it's perfectly normal as pydal is a

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Martin Weissenboeck
Thanks, I have tried it, but the scheduler needs an "application_name": In the module: db = DAL() scheduler = Scheduler(db, migrate=False) rtn = scheduler.queue_task("mytask") Now the return value of queue_task is rtn == {'errors': {'application_name': 'Enter a value'}, 'id': None,

Re: [web2py] Re: web2py for windows server. IIS or Nginx?

2016-11-02 Thread Niphlod
it's from some time ago but should work without issues. I think some improvements have been made regarding wfastcgi availability as a proper package, but in any case, I'm here to help (and maybe we can revisit the segment on the book with your experience). : should be "verbatim" but

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Niphlod
well mysched.queue_task(application_name='yourappname') BTW: application_name is usually either "appname" or "appname/controller_name" (the latter useful in cases where conditional models are required an/or the task is defined in the controller rather than in a model) On Wednesday,

[web2py] Re: scheduler creates "zombie" processes

2016-11-02 Thread Niphlod
I'm naturally curious to know the culprit in your env, but unfortunately I can't reproduce in any of my systems (*buntu 14.04 + postgresql/sqlite or Win2012r2 + postgresql/sqlite/mssql). Needs to be said that I mostly hate mysql (and would never trust it nor recommend to the worst of my

[web2py] Non-users getting permissions by setting auth.settings.everybody_group_id?

2016-11-02 Thread Horst Horst
I've found a behavior in 2.14.6 which makes me scratch my head. I have set auth.settings.everybody_group_id = 2 in order to make every user part of the "user" group (2). The auth_membership reflects this explicitely for each added user. I have granted several permissions to group 2, e.g. one

[web2py] Re: How to start a scheduler task from a module?

2016-11-02 Thread Niphlod
tl;dr : it just gets automatically filled with "request.application/request.controller" in a web environment that it is missing in your module. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Push Notifications

2016-11-02 Thread Dave S
On Wednesday, November 2, 2016 at 3:32:54 PM UTC-7, Jaimee S wrote: > > Hello, > > My website allows users to send messages to one another; however, the only > way to see their new messages is to refresh the page. Is there any way to > notify the user via any method? > > Thanks for your time

Re: [web2py] Re: web2py for windows server. IIS or Nginx?

2016-11-02 Thread Pbop
We built a SHIB SSO and OAUTH SSO middleware in web2py that handles 1000+ concurrent users with very good results in IIS and ISAPI running a WSGI wrapper ala the cookbook instructions. I hear IIS and FastCGI and wonder if this is a better deployment option? Are you aware of any advantages of

[web2py] Push Notifications

2016-11-02 Thread Jaimee S
Hello, My website allows users to send messages to one another; however, the only way to see their new messages is to refresh the page. Is there any way to notify the user via any method? Thanks for your time -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Push Notifications

2016-11-02 Thread Jaimee S
Thanks for the speedy reply! I've looked over the links you sent. the first two didn't work for me on my browser. I'm on a a mac and used the default browser. Will having a web socket open 24/7 slow down my website? My knowledge of web sockets is limited at the moment On Wednesday, November

[web2py] Re: Push Notifications

2016-11-02 Thread Anthony
On Wednesday, November 2, 2016 at 7:52:05 PM UTC-4, Dave S wrote: > > There are 2 mechanism in HTML5, I believe, but I'm only going to point you > at one for the moment: Web Workers. > http://www.htmlgoodies.com/html5/javascript/working-with-web-workers-in-html5-powered-web-pages.html > > >

[web2py] Re: Non-users getting permissions by setting auth.settings.everybody_group_id?

2016-11-02 Thread Anthony
Perhaps the documentation could explain this better, but the auth.has_permission method is designed to check whether a specific user or specific group has a particular permission. It does not check whether the current user is logged in. If you do not specify either the user_id argument or the

Re: [web2py] Re: web2py for windows server. IIS or Nginx?

2016-11-02 Thread Omi Chiba
OK! I failed last time but it worth try again. I will follow the book try it later. http://www.web2py.com/books/default/chapter/29/13/deployment-recipes?search=iis#IIS On Wednesday, November 2, 2016 at 3:43:37 AM UTC-5, Niphlod wrote: > > *nix --> nginx with uwsgi > windows --> iis with fastcgi

[web2py] Re: What is the recommended way to translate dynamic contents in a multilingual website?

2016-11-02 Thread Leonel Câmara
If I understood your question correctly, I think I have answered this, here: https://groups.google.com/forum/#!topic/web2py/y1QYmM4HfeM -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: scheduler creates "zombie" processes

2016-11-02 Thread Erwn Ltmann
Hi Niphlod, your replies are always a pleasure to me. :) On Wednesday, November 2, 2016 at 12:00:48 PM UTC+1, Niphlod wrote: > > I'd say there are a LOT of strange things going on on your system, since > you're reporting several different issues that nobody ever faced and all in > the last

Re: [web2py] Re: web2py for windows server. IIS or Nginx?

2016-11-02 Thread Niphlod
*nix --> nginx with uwsgi windows --> iis with fastcgi On Tuesday, November 1, 2016 at 8:01:22 PM UTC+1, Omi Chiba wrote: > > Thank you! I will stick to Apache/wsgi for now. > > On Tuesday, November 1, 2016 at 1:54:37 PM UTC-5, Jim S wrote: >> >> I think the thread you referenced was one

Re: [web2py] matching a Week day in query

2016-11-02 Thread Manuele Pesenti
Il 02/11/16 09:27, icodk ha scritto: > Ex. on Manday I want to select all record where the Monday field is true. maybe something like that? |fromdatetime importdate importcalendar my_date =date.today()dow = calendar.day_name[my_date.weekday()].lower() db(db.time_rule[dow]==True).select() | ||

[web2py] matching a Week day in query

2016-11-02 Thread icodk
I have a table with a Boolean field for each week day. How can I select all records of which a certain week day is true ? Ex. on Manday I want to select all record where the Monday field is true. db.define_table('time_rule', Field('start_time','time'),

Re: [web2py] matching a Week day in query

2016-11-02 Thread icodk
Thanks Manuele Looks like it work On Wednesday, November 2, 2016 at 9:47:20 AM UTC+1, Manuele wrote: > > Il 02/11/16 09:27, icodk ha scritto: > > Ex. on Manday I want to select all record where the Monday field is true. > > maybe something like that? > > from datetime import dateimport