[web2py] Re: Error when sending email from my custom web app [Errno 111] Connection refuse

2019-01-16 Thread Rahul

Hi All,
This is fixed. This wasn't the specific python error - It was email 
server error. 

Solution:  I edited my postfix *master.cf* file and changed the below line 
. Restarted the postfix server. That eliminated the connection error. 

*/etc/postfix/master.cf*


#smtps inet  n   -   -   -   -   smtpd

to:

*smtps inet  n   -   -   -   -   smtpd*


Thanks!

Rahul. 


On Monday, January 14, 2019 at 5:13:57 PM UTC+5:30, Rahul wrote:
>
> Hi All,
> I have a custom email function that was working fine previously 
> (with gmail). Now after gmail's policies got updated, I am not able to use 
> it properly. I got myself an email server which works on port 465 (SSL)  or 
> port 26(Not secure/not recommended version) for SMTP. Also, I am able to 
> send and receive mails using outlook or thunderbird for my mail server.  
> However, I am not able to send emails using my server settings from my own 
> custom software. 
>
> I feed my application with below  - 
>
>1. smtp server,  - mail.tsoft.xx.xx 
>2. port_no,  - 465 or 26
>3. user_name,  -- username@  
>4. password  -- password for the user
>
> Now I am getting Connection refused error. 
>  [Errno 111] Connection refused
>
> File "/home/www-data/web2py/applications/Target/controllers/default.py", line 
> 408, in new_ticket
> email(team_name, mail_Subject , final_mail_body, img1)
>   File "/home/www-data/web2py/applications/Target/controllers/default.py", 
> line 6151, in email
> server = smtplib.SMTP(host, port)
>   File "/usr/lib/python2.7/smtplib.py", line 256, in __init__
> (code, msg) = self.connect(host, port)
>   File "/usr/lib/python2.7/smtplib.py", line 316, in connect
> self.sock = self._get_socket(host, port, self.timeout)
>   File "/usr/lib/python2.7/smtplib.py", line 291, in _get_socket
> return socket.create_connection((host, port), timeout)
>   File "/usr/lib/python2.7/socket.py", line 575, in create_connection
> raise err
> error: [Errno 111] Connection refused
>
>
> I referred to this group (below) but to no avail
>
>
> https://groups.google.com/forum/#!searchin/web2py/Connection$20refused|sort:date/web2py/_cgI-jPfoIM/9p21qXtqHdEJ
>
>
>
> I have tried changing my ports to 465, and 26 ( ironically only 26 works 
> from my local for sending mails but not in production where the application 
> is hosted. Even tried with it IP of the mail server but it wont work. even 
> tried with username without @ sign.  Please suggest  if you have any 
> idea/clues.
>
>
> Thanks,
>
> Rahul
>

-- 
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: How to preserve line breaks in text field

2019-01-16 Thread Alex Glaros

>
> I'm using Windows; tried the highlighted command below so that PDF maker 
> would replace Windows line-break with , but didn't work


> text = 
> (r.client_controlled_documentation_stakeholder_content_narrative_description)

str(text).replace('\n','\n')

story.append(Paragraph(escape(text), styles["Normal"]))



On Tuesday, January 15, 2019 at 8:15:50 AM UTC-8, Alex Glaros wrote:
>
> When converting to PDF, line breaks from a text field are collapsed. How 
> to retain the line breaks? Here is the PDF-creating code
>
>  
>
> text = 
> (r.client_controlled_documentation_stakeholder_content_narrative_description)
>
> story.append(Paragraph(escape(text), styles["Normal"]))
>
>
>
> I tried
>
>  
>
> 
> db.client_controlled_documentation_stakeholder_content.client_controlled_documentation_stakeholder_content_narrative_description.represent
>  
> = lambda value, row : PRE(value)
>
>
>
> and also tried
>
>  
>
> 
> db.client_controlled_documentation_stakeholder_content.client_controlled_documentation_stakeholder_content_narrative_description.represent
>  
> = lambda v, r: DIV(v, _style='white-space:nowrap')
>
> Alex Glaros
>
>

-- 
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: Slightly on-topic -- CMSs

2019-01-16 Thread Richard Vézina
My thoughs about CMS (they all sucks).

They are maintains by the one who put them in place (prog side and content
side), so you gonna find challenge in bringing someone to maintain the
content in it out of IT and in IT you will find it difficult to find
someone who wants maintain the content... So their only purpose is not
having to recall the CSS to apply to each piece of the content to not break
the visual of the much simple traditional web site that you could create to
handle the limited content that will ever be publish in the CMS...

I might be a bit rough about CMS here, but I had been a big believer back
in the 2000's (2002-3 and the couples of years after that until I stumble
on RoR and discover frameworks paradigm)...

Frameworks make just more sens as you can craft only what you need and
extend them as much as you need...

Now I am not saying to remplace CMS by custom app is always a good idea, as
it is a waste of time recreate WordPress, Drupal et al.

But I am advocate that you evaluate the need for a CMS carefull and write
down the client real requirements and what the expect, if they expect you
to handle the design and content and the site they expect is pretty
simple... CMS is a bad idea... As they are difficult to design to look
different than the competition... If the needs are so specific that you
will end customizing with a bunch of plugin a Word Press installation and
make it a nightmare to maintain over time, I say, your client need you
service as an app developer and frameworks are you best bet...

About Python CMS, I recall the venerable Plone to be one of the only back
in time, still is I guess... On Django side you can get many CMS Django
applications I would look there for modern CMS... But again, most risk of
not be exactly what you want and require a lot of customization...

Good luck




On Wed, Jan 16, 2019 at 7:59 PM Dave S  wrote:

>
>
> On Thursday, January 10, 2019 at 11:13:56 PM UTC-8, Dave S wrote:
>>
>>
>>
>> On Tuesday, January 8, 2019 at 8:14:27 PM UTC-8, Dave S wrote:
>>>
>>> I'd like to ask a couple questions of those of you running a Content
>>> Management System in conjunction with web2py applications.
>>>
>>> 1.  What do you consider important in a CMS?
>>> 2.  Who's in charge? (no, not names, what roles in the organization
>>> handle the CMS and what roles the application?)
>>> 3.  How do you handle changes on one side so that the other side keeps
>>> up?
>>> 4.  How happy are you with your CMS?
>>> 5.  What do you wish was different?
>>> 6.  Does the application think the CMS is just a special purpose
>>> database, or does the CMS affect the application logic?
>>>
>>> I think that's enough to get me started with building a picture.  I
>>> appreciate your thoughts and assistance.
>>>
>>>
>> I'm particularly interested in comments about the Wordpress CMS.
>>
>> /dps
>>
>>
>
> The downside of Wordpress (and Joobal and Drupal, the other members of
> what seems to be the Big 3 per WikiP) is PHP.  Any good pointers to a
> Python implementation?
>
> And for completeness, is SharePoint considered a CMS?
>
> /dps
>
> --
> 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.
>

-- 
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] web2py dev env on chromebook?

2019-01-16 Thread Vlad
If anybody has succeeded in setting up the dev env on chromebook I would 
greatly appreciate some pointers. 
I was able to get into dev mode and install linux on it, so linux is sort 
of functional, but it's not complete. There is probably something specific 
about chromebook, but I didn't find anything by googling it. 
I simply want to have local web2py dev env on it... (My regular env is 
windows; I am not too proficient in linux - if it works I can handle it, 
but if something gets stuck, I don't know how to handle 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: Slightly on-topic -- CMSs

2019-01-16 Thread Dave S


On Thursday, January 10, 2019 at 11:13:56 PM UTC-8, Dave S wrote:
>
>
>
> On Tuesday, January 8, 2019 at 8:14:27 PM UTC-8, Dave S wrote:
>>
>> I'd like to ask a couple questions of those of you running a Content 
>> Management System in conjunction with web2py applications.
>>
>> 1.  What do you consider important in a CMS?
>> 2.  Who's in charge? (no, not names, what roles in the organization 
>> handle the CMS and what roles the application?)
>> 3.  How do you handle changes on one side so that the other side keeps up?
>> 4.  How happy are you with your CMS?
>> 5.  What do you wish was different?
>> 6.  Does the application think the CMS is just a special purpose 
>> database, or does the CMS affect the application logic?
>>
>> I think that's enough to get me started with building a picture.  I 
>> appreciate your thoughts and assistance.
>>
>>
> I'm particularly interested in comments about the Wordpress CMS.
>
> /dps
>  
>

The downside of Wordpress (and Joobal and Drupal, the other members of what 
seems to be the Big 3 per WikiP) is PHP.  Any good pointers to a Python 
implementation?

And for completeness, is SharePoint considered a CMS?

/dps

-- 
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 apps & github

2019-01-16 Thread Dave S


On Wednesday, January 16, 2019 at 4:21:10 PM UTC-8, 黄祥 wrote:
>
> agree, learn from several web2py app on github some of them didn't include 
> the private folders
> btw github now offering private repo for free, so if you want to keep it 
> on just set it in the private repo
>
> best regards
> stifan
>

But the template method helps ensure that .. even if you are the only 
accessor of the repo .. that you don't set up System Z with System Y's 
settings.

/dps
 

-- 
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 apps & github

2019-01-16 Thread Eliezer (Vlad) Tseytkin
Thank you!

On Wed, Jan 16, 2019, 6:46 PM Dave S 
>
> On Wednesday, January 16, 2019 at 3:10:22 PM UTC-8, Vlad wrote:
>>
>> Dave,
>> you mentioned "Sanitize private/appconfig.ini" - could you please comment
>> on it -
>> I am not sure how this file is used by web2py, but seems that it may have
>> some private info (though has some generics for me now).
>> Should I just exclude it from git? Is it getting recreated by w2p or...
>> What did you mean by "sanitize" in this case?
>>
>>
> Put a placeholder for system-specific  information, especially paths/urls
> and passwords ... appconfig.ini often has those specified for the DAL
> connectors.  What should be in github (or other repos) is a *template*,
> and best to call it a name that relates to appconfig.ini but makes clear
> its role; something like appcfg_template.ini.  By changing the name, you
> make sure that System Y's appconfig.ini isn't published to github by an
> automatic accident.  [This is the general advice for archiving .ini and .rc
> files of all types.]
>
> The distribution does this with the mailer settings, and having an sqlite
> uri in the template isn't too risky, since that usually needs local
> access.  But for a Foxglove DB running on a remote server, you'd fill in
> the template with something like:
>
> uri= fxgl:///ADMINNAME:ADPWD@myremotedigitalisserver
>
> and then on installation, copy the template to appconfig.ini and open it
> in an editor to fill in the actual values.
>
> /dps
>
>
> On Monday, January 7, 2019 at 7:21:55 PM UTC-5, Dave S wrote:
>>>
>>>
>>>
>>> On Sunday, January 6, 2019 at 12:45:27 PM UTC-8, Vlad wrote:

 Oh, I didn't express myself precisely: I am asking about Github - I am
 setting up a Github repository and wondering what exactly from the app
 directory should go in there - without extra files and without missing
 files  - to preserve complete app/set


>>> You don't want the sessions or errors folders (they'll get recreated by
>>> web2py if missing, and should be cleaned out from time to time anyway).
>>> You may choose to also skip the databases folder, as the table files are
>>> recreated from the models.  IIRC, you're using an external database server
>>> rather than sqlite3, so you have other ways of backing up the data (I
>>> wouldn't backup sqlite3 to github, either).  If you have uploads, you
>>> should probably back them up separately, as well.
>>>
>>> You should have all .py files, from your myapp toplevel as well as
>>> controllers, models, modules, and scripts, and then your files from static
>>> and views, and languages if you've updated that.  Sanitize
>>> private/appconfig.ini and save is as private/sample-appconfig.ini (keep an
>>> indication of how to reach your db).
>>>
>>> /dps
>>>
>>>
>>>
 On Sun, Jan 6, 2019 at 2:51 PM 黄祥  wrote:

> for pack or unpack thing it's use tar
> ref:
> https://groups.google.com/d/msg/web2py/khiGuJYxHpo/clEEU7n3VGEJ
>
> best regards,
> stifan
>
> --
> 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+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
 --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

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


Re: [web2py] Re: web2py apps & github

2019-01-16 Thread 黄祥
agree, learn from several web2py app on github some of them didn't include 
the private folders
btw github now offering private repo for free, so if you want to keep it on 
just set it in the private repo

best regards
stifan

-- 
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 apps & github

2019-01-16 Thread Dave S


On Wednesday, January 16, 2019 at 3:10:22 PM UTC-8, Vlad wrote:
>
> Dave, 
> you mentioned "Sanitize private/appconfig.ini" - could you please comment 
> on it - 
> I am not sure how this file is used by web2py, but seems that it may have 
> some private info (though has some generics for me now). 
> Should I just exclude it from git? Is it getting recreated by w2p or... 
> What did you mean by "sanitize" in this case?
>
>
Put a placeholder for system-specific  information, especially paths/urls 
and passwords ... appconfig.ini often has those specified for the DAL 
connectors.  What should be in github (or other repos) is a *template*, and 
best to call it a name that relates to appconfig.ini but makes clear its 
role; something like appcfg_template.ini.  By changing the name, you make 
sure that System Y's appconfig.ini isn't published to github by an 
automatic accident.  [This is the general advice for archiving .ini and .rc 
files of all types.]

The distribution does this with the mailer settings, and having an sqlite 
uri in the template isn't too risky, since that usually needs local 
access.  But for a Foxglove DB running on a remote server, you'd fill in 
the template with something like:

uri= fxgl:///ADMINNAME:ADPWD@myremotedigitalisserver

and then on installation, copy the template to appconfig.ini and open it in 
an editor to fill in the actual values.

/dps


On Monday, January 7, 2019 at 7:21:55 PM UTC-5, Dave S wrote:
>>
>>
>>
>> On Sunday, January 6, 2019 at 12:45:27 PM UTC-8, Vlad wrote:
>>>
>>> Oh, I didn't express myself precisely: I am asking about Github - I am 
>>> setting up a Github repository and wondering what exactly from the app 
>>> directory should go in there - without extra files and without missing 
>>> files  - to preserve complete app/set
>>>
>>>
>> You don't want the sessions or errors folders (they'll get recreated by 
>> web2py if missing, and should be cleaned out from time to time anyway).  
>> You may choose to also skip the databases folder, as the table files are 
>> recreated from the models.  IIRC, you're using an external database server 
>> rather than sqlite3, so you have other ways of backing up the data (I 
>> wouldn't backup sqlite3 to github, either).  If you have uploads, you 
>> should probably back them up separately, as well.
>>
>> You should have all .py files, from your myapp toplevel as well as 
>> controllers, models, modules, and scripts, and then your files from static 
>> and views, and languages if you've updated that.  Sanitize 
>> private/appconfig.ini and save is as private/sample-appconfig.ini (keep an 
>> indication of how to reach your db).
>>
>> /dps
>>
>>  
>>
>>> On Sun, Jan 6, 2019 at 2:51 PM 黄祥  wrote:
>>>
 for pack or unpack thing it's use tar
 ref:
 https://groups.google.com/d/msg/web2py/khiGuJYxHpo/clEEU7n3VGEJ

 best regards,
 stifan

 -- 
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>

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


[web2py] Re: share AlaSQL

2019-01-16 Thread 黄祥
seems trending on github recently, had anyone tried it with web2py, any 
hints?

best regards,
stifan

-- 
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 apps & github

2019-01-16 Thread Vlad
Dave, 
you mentioned "Sanitize private/appconfig.ini" - could you please comment 
on it - 
I am not sure how this file is used by web2py, but seems that it may have 
some private info (though has some generics for me now). 
Should I just exclude it from git? Is it getting recreated by w2p or... 
What did you mean by "sanitize" in this case?

On Monday, January 7, 2019 at 7:21:55 PM UTC-5, Dave S wrote:
>
>
>
> On Sunday, January 6, 2019 at 12:45:27 PM UTC-8, Vlad wrote:
>>
>> Oh, I didn't express myself precisely: I am asking about Github - I am 
>> setting up a Github repository and wondering what exactly from the app 
>> directory should go in there - without extra files and without missing 
>> files  - to preserve complete app/set
>>
>>
> You don't want the sessions or errors folders (they'll get recreated by 
> web2py if missing, and should be cleaned out from time to time anyway).  
> You may choose to also skip the databases folder, as the table files are 
> recreated from the models.  IIRC, you're using an external database server 
> rather than sqlite3, so you have other ways of backing up the data (I 
> wouldn't backup sqlite3 to github, either).  If you have uploads, you 
> should probably back them up separately, as well.
>
> You should have all .py files, from your myapp toplevel as well as 
> controllers, models, modules, and scripts, and then your files from static 
> and views, and languages if you've updated that.  Sanitize 
> private/appconfig.ini and save is as private/sample-appconfig.ini (keep an 
> indication of how to reach your db).
>
> /dps
>
>  
>
>> On Sun, Jan 6, 2019 at 2:51 PM 黄祥  wrote:
>>
>>> for pack or unpack thing it's use tar
>>> ref:
>>> https://groups.google.com/d/msg/web2py/khiGuJYxHpo/clEEU7n3VGEJ
>>>
>>> best regards,
>>> stifan
>>>
>>> -- 
>>> 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+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

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


[web2py] share AlaSQL

2019-01-16 Thread Richard
Hi All,

Fall on this new JS database in browser, SQL/NoSQL 
: https://github.com/agershun/alasql

Seems promissing for simple application, or maybe local storage to speed 
app.

Richard

-- 
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 fail intermitently with no apparent reason (sys.exit(1))

2019-01-16 Thread Lisandro
Thank you all you guys for the help.
I've found an inconsistence in my own code. I have a scheduled task that 
checks all the other tasks of the scheduler and sends me an email if 
something failed or timed out. The email includes the error traceback, but 
an error is making the function to include an incorrect traceback, so 
that's where my confusion came. Sorry for the bother, I think it's working 
as it is supposed to.

To answer Dave's question: new apps are installed around 5 times per day. 
Also, once per week a bunch of apps are removed. This process works 
smoothly (I use uwsgi chain reload to avoid any issues). 

Thanks again!


El miércoles, 16 de enero de 2019, 5:35:32 (UTC-3), Dave S escribió:
>
>
>
> On Tuesday, January 15, 2019 at 11:31:51 AM UTC-8, Lisandro wrote:
>>
>> Thank you Leonel, that could be the reason, or at least could be related.
>> The "models" folder in those cases wasn't removed or anything like that, 
>> but still I should mention a couple of things about my scenario:
>>
>> * I have several web2py apps installed, serving multiple websites; each 
>> website has two applications, and for every website, the "models" folder is 
>> present in the first application, and it's symlinked in the second one.
>>
>> * Websites are created on demand: a scheduled task installs new 
>> applications, creating the necessary folders, db, etc.
>>
>>
>> The times those tasks failed, they didn't correspond to an application 
>> that was being installed at that time. 
>> I always run the scheduler with -K , and main_app is of course 
>> always installed.
>>
>> I'm not sure how the scheduler works, maybe it needs to read the models 
>> folder in every installed application? 
>>
>>
> Try stopping the scheduler for other apps during an install.  The task 
> doing the install should have all it's environment set up [by the scheduler 
> in it's app] before the the new app folder is created, so that should be 
> alright.  You might want to make sure the installer app doesn't have 
> anything else scheduled too close in time to the installation.
>
> How often are you installing new apps?
>
> /dps
>
>
>  
>
>>
>> El martes, 15 de enero de 2019, 15:34:53 (UTC-3), Leonel Câmara escribió:
>>>
>>> *Lisandro *that problem is appearing when trying to create an 
>>> environment to execute the task, where it imports the mod tels from the 
>>> application. Is it possible the folder of the application has been removed 
>>> or moved before the scheduler task is run?
>>>
>>> This would explain why it doesn't happen frequently.
>>>
>>

-- 
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 fail intermitently with no apparent reason (sys.exit(1))

2019-01-16 Thread Dave S


On Tuesday, January 15, 2019 at 11:31:51 AM UTC-8, Lisandro wrote:
>
> Thank you Leonel, that could be the reason, or at least could be related.
> The "models" folder in those cases wasn't removed or anything like that, 
> but still I should mention a couple of things about my scenario:
>
> * I have several web2py apps installed, serving multiple websites; each 
> website has two applications, and for every website, the "models" folder is 
> present in the first application, and it's symlinked in the second one.
>
> * Websites are created on demand: a scheduled task installs new 
> applications, creating the necessary folders, db, etc.
>
>
> The times those tasks failed, they didn't correspond to an application 
> that was being installed at that time. 
> I always run the scheduler with -K , and main_app is of course 
> always installed.
>
> I'm not sure how the scheduler works, maybe it needs to read the models 
> folder in every installed application? 
>
>
Try stopping the scheduler for other apps during an install.  The task 
doing the install should have all it's environment set up [by the scheduler 
in it's app] before the the new app folder is created, so that should be 
alright.  You might want to make sure the installer app doesn't have 
anything else scheduled too close in time to the installation.

How often are you installing new apps?

/dps


 

>
> El martes, 15 de enero de 2019, 15:34:53 (UTC-3), Leonel Câmara escribió:
>>
>> *Lisandro *that problem is appearing when trying to create an 
>> environment to execute the task, where it imports the mod tels from the 
>> application. Is it possible the folder of the application has been removed 
>> or moved before the scheduler task is run?
>>
>> This would explain why it doesn't happen frequently.
>>
>

-- 
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.