| | 1 | = Project control = |
|---|
| | 2 | |
|---|
| | 3 | == Project control scripts == |
|---|
| | 4 | |
|---|
| | 5 | The following Python scripts control a project: |
|---|
| | 6 | |
|---|
| | 7 | bin/start :: |
|---|
| | 8 | Start the project: start all daemons, and remove the stop_sched and stop_daemon files (see below). |
|---|
| | 9 | bin/stop:: |
|---|
| | 10 | Stop the project (create the stop_sched and stop_daemon files) |
|---|
| | 11 | bin/start --cron:: |
|---|
| | 12 | If the project is started, perform all periodic tasks that are past due, and start any daemons that aren't running. Otherwise do nothing. |
|---|
| | 13 | bin/status:: |
|---|
| | 14 | Show whether the project is stopped. Show the status of all daemons. Show the status of all periodic tasks (e.g., when they were last executed). |
|---|
| | 15 | |
|---|
| | 16 | == Trigger files == |
|---|
| | 17 | |
|---|
| | 18 | The following files (in the project root directory) can be used to turn off various parts of a project. |
|---|
| | 19 | |
|---|
| | 20 | stop_sched :: |
|---|
| | 21 | Have the scheduler return 'project down' messages. |
|---|
| | 22 | stop_daemons:: |
|---|
| | 23 | Tell all daemon process to exit. |
|---|
| | 24 | stop_web:: |
|---|
| | 25 | Have the web site return 'project down' messages for all functions that require database access. |
|---|
| | 26 | stop_upload:: |
|---|
| | 27 | Have the file upload handler return transient error messages to clients (they'll back off and retry later). |
|---|
| | 28 | |
|---|
| | 29 | The presence of a file triggers the function. For example, to turn off data-driven web pages, type |
|---|
| | 30 | {{{ |
|---|
| | 31 | touch stop_web |
|---|
| | 32 | }}} |
|---|
| | 33 | and to turn them back on, type |
|---|
| | 34 | {{{ |
|---|
| | 35 | rm stop_web |
|---|
| | 36 | }}} |
|---|
| | 37 | If the first three files are all present, no database access will occur. You should do this during most maintenance functions (such as upgrading software). |