I used to host my web2py application at Webfaction, there I scheduled
a cron job to run the sessions2trash.py script. In the end this no
longer worked.
Now I host my web2py application at Opalstack, and wonder how I
schedule a task to run sessions2trash.py to clean up my applications.
Kind rega
I have web2py 2.9.11 installed, I did not update from a previous version.
When I run the following command:
lionserver:web2py_develop mymac$ python web2py.py -S init -M -R
scripts/sessions2trash.py -A -o -x 0
I get the following output:
web2py Web Framework
Created by Massimo Di Pierro, Copyri
To clean up session on my production environment I thought of calling the
sessions2trash.py this way:
nohup python ~/webapps/w2p/web2py/web2py.py -S admin -R
scripts/sessions2trash.py -A -o -x 3600 -f -v -s &
nohup python ~/webapps/w2p/web2py/web2py.py -S myleonexus -R
scripts/sessions2trash.py
I have set the sessions2trash script in my web2py.ini (for uwsgi) like
this -
cron = 0 0 -1 -1 -1 python /var/www/web2py/web2py.py -Q -S myapp -M -R
scripts/sessions2trash.py -A -o -v
My uwsgi.log says
[uwsgi-cron] command "python /var/www/web2py/web2py.py -Q -S myapp -M -R
scripts/session
current.response._dbtable_and_field is referenced in sessions2trash.py.
That value was replaced in version 2.2.1 with
current.response.session_db_table, current.response.session_db_record_id,
and current.response.session_db_unique_key.
Attached is a fixed version of sessions2trash.py.
--
On Jan 11, 2012, at 11:49 AM, Chris wrote:
> I am getting an error when I run the following script in my web2py
> directory:
>
> # python web2py.py -S init -R scripts/sessions2trash.py
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2011
> Version 1.99.2 (2011-09-26 06:55:33
Hello,
I am getting an error when I run the following script in my web2py
directory:
# python web2py.py -S init -R scripts/sessions2trash.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.2 (2011-09-26 06:55:33) stable
Database drivers available: SQLite3, Post
Hello,
(this may be a repost, having some technical trouble)
I was trying to run sessions2trash and getting the following error:
# python web2py.py -S init -R scripts/sessions2trash.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.2 (2011-09-26 06:55:33) sta
On Monday, May 9, 2011 10:15:33 AM UTC-4, rochacbruno wrote:
>
> You should send a copy of this directly to Massimo's email and include
> 'patch' in subject..
It's already in trunk.
You should send a copy of this directly to Massimo's email and include
'patch' in subject..
On Fri, May 6, 2011 at 4:27 PM, Jim Karsten wrote:
> Ross Peoples and I created a new version of sessions2trash.py. Features
> include:
>
>- Deletes expired sessions files only based on sessions act
Ross Peoples and I created a new version of sessions2trash.py. Features
include:
- Deletes expired sessions files only based on sessions actual expiration
value.
- An option to delete sessions files once, then exit.
- An option to set the expiration time, overriding the defaul
11 matches
Mail list logo