Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

changes to ch 13 to improve content about Windows services with nssm #55

Merged
merged 2 commits into from

2 participants

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 10, 2013
  1. @timrichardson
Commits on Apr 12, 2013
  1. @timrichardson
This page is out of date. Refresh to see the latest.
View
2  sources/29-web2py-english/04.markmin
@@ -1127,7 +1127,7 @@ In the "generic.html" view this is done using ``{{=response.toolbar()}}``.
#### Separate sessions
-If you are storing sessions on system access may become a bottle-neck. One solution is the followingthe filesystem and you have lots of them, the file system access may become a bottle-neck. One solution is the following:
+If you are storing sessions on the filesystem and you have lots of them, the file system access may become a bottle-neck. One solution is the following:
``
session.connect(request, response, separate=True)
``:code
View
9 sources/29-web2py-english/13.markmin
@@ -1051,14 +1051,14 @@ Before doing this, you need to choose a name for your service.
There are strong advantages to creating a specific service for each app which needs a scheduler.
Therefore, your naming convention for services may be web2py_scheduler_app1
-After extracting the zip file, open a Windows command prompt in the folder containing the version for your architecture, and type
+After extracting the nssm zip file, open a Windows command prompt in the folder containing the version for your architecture, and type
``
nssm install web2py_scheduler_app1``:code
This shows a dialog asking you to enter Application and Options.
Application is the pythonw.exe executable from your Python installation.
-Options is
-``-K app1``:code
+Options is the rest of the command line. You may need to provide the full path to your web2py.py script. For example, the options field in the nssm dialog may be:
+``c:\web2py\web2py.py -K app1``:code
where app1 is the name of your application.
It is possible to invoke the scheduler with multiple applications. However, in this mode, web2py detaches each application's scheduler into a subprocess.
@@ -1255,6 +1255,9 @@ Here are some typical use cases:
nohup python web2py.py -S app -M -R scripts/sessions2trash.py &
``:code
+or in Windows, use nssm as described above in the scheduler section. You will probably need to include the full path to both web2py.py and the scripts folder, and the trailing & is not needed.
+
+
- Delete sessions older than 60 minutes regardless of expiration, with verbose output, then exit:
``
python web2py.py -S app -M -R scripts/sessions2trash.py -A -o -x 3600 -f -v
Something went wrong with that request. Please try again.