Fossil SCM
Add the backoffice-disable setting to completely disable all backoffice processing.
Commit
2467a356fe772457b211e67eff4de932f39be9598d078ca51c335b67f326ea2c
Parent
71399243349a580…
3 files changed
+1
+14
+8
-2
+1
| --- src/backoffice.c | ||
| +++ src/backoffice.c | ||
| @@ -382,10 +382,11 @@ | ||
| 382 | 382 | |
| 383 | 383 | if( backofficeDb ) return; |
| 384 | 384 | if( g.zRepositoryName==0 ) return; |
| 385 | 385 | if( g.db==0 ) return; |
| 386 | 386 | if( !db_table_exists("repository","config") ) return; |
| 387 | + if( db_get_boolean("backoffice-disable",0) ) return; | |
| 387 | 388 | tmNow = time(0); |
| 388 | 389 | backofficeReadLease(&x); |
| 389 | 390 | if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){ |
| 390 | 391 | /* Another backoffice process is already queued up to run. This |
| 391 | 392 | ** process does not need to do any backoffice work. */ |
| 392 | 393 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -382,10 +382,11 @@ | |
| 382 | |
| 383 | if( backofficeDb ) return; |
| 384 | if( g.zRepositoryName==0 ) return; |
| 385 | if( g.db==0 ) return; |
| 386 | if( !db_table_exists("repository","config") ) return; |
| 387 | tmNow = time(0); |
| 388 | backofficeReadLease(&x); |
| 389 | if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){ |
| 390 | /* Another backoffice process is already queued up to run. This |
| 391 | ** process does not need to do any backoffice work. */ |
| 392 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -382,10 +382,11 @@ | |
| 382 | |
| 383 | if( backofficeDb ) return; |
| 384 | if( g.zRepositoryName==0 ) return; |
| 385 | if( g.db==0 ) return; |
| 386 | if( !db_table_exists("repository","config") ) return; |
| 387 | if( db_get_boolean("backoffice-disable",0) ) return; |
| 388 | tmNow = time(0); |
| 389 | backofficeReadLease(&x); |
| 390 | if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){ |
| 391 | /* Another backoffice process is already queued up to run. This |
| 392 | ** process does not need to do any backoffice work. */ |
| 393 |
M
src/db.c
+14
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3030,10 +3030,24 @@ | ||
| 3030 | 3030 | ** SETTING: backoffice-nodelay boolean default=off |
| 3031 | 3031 | ** If backoffice-nodelay is true, then the backoffice processing |
| 3032 | 3032 | ** will never invoke sleep(). If it has nothing useful to do, |
| 3033 | 3033 | ** it simply exits. |
| 3034 | 3034 | */ |
| 3035 | +/* | |
| 3036 | +** SETTING: backoffice-disable boolean default=off | |
| 3037 | +** If backoffice-disable is true, then the automatic backoffice | |
| 3038 | +** processing is disabled. Automatic backoffice processing is the | |
| 3039 | +** backoffice work that normally runs after each web page is | |
| 3040 | +** rendered. Backoffice processing that is triggered by the | |
| 3041 | +** "fossil backoffice" command is unaffected by this setting. | |
| 3042 | +** | |
| 3043 | +** Backoffice processing does things such as delivering | |
| 3044 | +** email notifications. So if this setting is true, and if | |
| 3045 | +** there is no cron job periodically running "fossil backoffice", | |
| 3046 | +** email notifications and other work normally done by the | |
| 3047 | +** backoffice will not occur. | |
| 3048 | +*/ | |
| 3035 | 3049 | /* |
| 3036 | 3050 | ** SETTING: backoffice-logfile width=40 |
| 3037 | 3051 | ** If backoffice-logfile is not an empty string and is a valid |
| 3038 | 3052 | ** filename, then a one-line message is appended to that file |
| 3039 | 3053 | ** every time the backoffice runs. This can be used for debugging, |
| 3040 | 3054 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3030,10 +3030,24 @@ | |
| 3030 | ** SETTING: backoffice-nodelay boolean default=off |
| 3031 | ** If backoffice-nodelay is true, then the backoffice processing |
| 3032 | ** will never invoke sleep(). If it has nothing useful to do, |
| 3033 | ** it simply exits. |
| 3034 | */ |
| 3035 | /* |
| 3036 | ** SETTING: backoffice-logfile width=40 |
| 3037 | ** If backoffice-logfile is not an empty string and is a valid |
| 3038 | ** filename, then a one-line message is appended to that file |
| 3039 | ** every time the backoffice runs. This can be used for debugging, |
| 3040 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3030,10 +3030,24 @@ | |
| 3030 | ** SETTING: backoffice-nodelay boolean default=off |
| 3031 | ** If backoffice-nodelay is true, then the backoffice processing |
| 3032 | ** will never invoke sleep(). If it has nothing useful to do, |
| 3033 | ** it simply exits. |
| 3034 | */ |
| 3035 | /* |
| 3036 | ** SETTING: backoffice-disable boolean default=off |
| 3037 | ** If backoffice-disable is true, then the automatic backoffice |
| 3038 | ** processing is disabled. Automatic backoffice processing is the |
| 3039 | ** backoffice work that normally runs after each web page is |
| 3040 | ** rendered. Backoffice processing that is triggered by the |
| 3041 | ** "fossil backoffice" command is unaffected by this setting. |
| 3042 | ** |
| 3043 | ** Backoffice processing does things such as delivering |
| 3044 | ** email notifications. So if this setting is true, and if |
| 3045 | ** there is no cron job periodically running "fossil backoffice", |
| 3046 | ** email notifications and other work normally done by the |
| 3047 | ** backoffice will not occur. |
| 3048 | */ |
| 3049 | /* |
| 3050 | ** SETTING: backoffice-logfile width=40 |
| 3051 | ** If backoffice-logfile is not an empty string and is a valid |
| 3052 | ** filename, then a one-line message is appended to that file |
| 3053 | ** every time the backoffice runs. This can be used for debugging, |
| 3054 |
+8
-2
| --- www/backoffice.md | ||
| +++ www/backoffice.md | ||
| @@ -166,11 +166,11 @@ | ||
| 166 | 166 | > fossil test-backoffice-lease -R _REPOSITORY_ |
| 167 | 167 | |
| 168 | 168 | Running that command every few seconds should show what is going on with |
| 169 | 169 | backoffice processing in a particular repository. |
| 170 | 170 | |
| 171 | -There are also two settings that control backoffice behavior. The | |
| 171 | +There are also settings that control backoffice behavior. The | |
| 172 | 172 | "backoffice-nodelay" setting prevents the "next" process from taking a |
| 173 | 173 | lease and sleeping. If "backoffice-nodelay" is set, that causes all |
| 174 | 174 | backoffice processes to exit either immediately or after doing whatever |
| 175 | 175 | backoffice works needs to be done. If something is going wrong and |
| 176 | 176 | backoffice leases are causing delays in webpage processing, then setting |
| @@ -177,7 +177,13 @@ | ||
| 177 | 177 | "backoffice-nodelay" to true can work around the problem until the bug |
| 178 | 178 | can be fixed. The "backoffice-logfile" setting is the name of a log |
| 179 | 179 | file onto which is appended a short message everything a backoffice |
| 180 | 180 | process actually starts to do the backoffice work. This log file can |
| 181 | 181 | be used to verify that backoffice really is running, if there is any |
| 182 | -doubt. Most installations should leave "backoffice-nodelay" off and | |
| 182 | +doubt. The "backoffice-disable" setting prevents automatic backoffice | |
| 183 | +processing, if true. Use this to completely disable backoffice processing | |
| 184 | +that occurs automatically after each HTTP request. The "backoffice-disable" | |
| 185 | +setting does not affect the operation of the manual | |
| 186 | +"fossil backoffice" command. | |
| 187 | +Most installations should leave "backoffice-nodelay" and "backoffice-disable" | |
| 188 | +set to their default values of off and | |
| 183 | 189 | leave "backoffice-logfile" unset or set to an empty string. |
| 184 | 190 |
| --- www/backoffice.md | |
| +++ www/backoffice.md | |
| @@ -166,11 +166,11 @@ | |
| 166 | > fossil test-backoffice-lease -R _REPOSITORY_ |
| 167 | |
| 168 | Running that command every few seconds should show what is going on with |
| 169 | backoffice processing in a particular repository. |
| 170 | |
| 171 | There are also two settings that control backoffice behavior. The |
| 172 | "backoffice-nodelay" setting prevents the "next" process from taking a |
| 173 | lease and sleeping. If "backoffice-nodelay" is set, that causes all |
| 174 | backoffice processes to exit either immediately or after doing whatever |
| 175 | backoffice works needs to be done. If something is going wrong and |
| 176 | backoffice leases are causing delays in webpage processing, then setting |
| @@ -177,7 +177,13 @@ | |
| 177 | "backoffice-nodelay" to true can work around the problem until the bug |
| 178 | can be fixed. The "backoffice-logfile" setting is the name of a log |
| 179 | file onto which is appended a short message everything a backoffice |
| 180 | process actually starts to do the backoffice work. This log file can |
| 181 | be used to verify that backoffice really is running, if there is any |
| 182 | doubt. Most installations should leave "backoffice-nodelay" off and |
| 183 | leave "backoffice-logfile" unset or set to an empty string. |
| 184 |
| --- www/backoffice.md | |
| +++ www/backoffice.md | |
| @@ -166,11 +166,11 @@ | |
| 166 | > fossil test-backoffice-lease -R _REPOSITORY_ |
| 167 | |
| 168 | Running that command every few seconds should show what is going on with |
| 169 | backoffice processing in a particular repository. |
| 170 | |
| 171 | There are also settings that control backoffice behavior. The |
| 172 | "backoffice-nodelay" setting prevents the "next" process from taking a |
| 173 | lease and sleeping. If "backoffice-nodelay" is set, that causes all |
| 174 | backoffice processes to exit either immediately or after doing whatever |
| 175 | backoffice works needs to be done. If something is going wrong and |
| 176 | backoffice leases are causing delays in webpage processing, then setting |
| @@ -177,7 +177,13 @@ | |
| 177 | "backoffice-nodelay" to true can work around the problem until the bug |
| 178 | can be fixed. The "backoffice-logfile" setting is the name of a log |
| 179 | file onto which is appended a short message everything a backoffice |
| 180 | process actually starts to do the backoffice work. This log file can |
| 181 | be used to verify that backoffice really is running, if there is any |
| 182 | doubt. The "backoffice-disable" setting prevents automatic backoffice |
| 183 | processing, if true. Use this to completely disable backoffice processing |
| 184 | that occurs automatically after each HTTP request. The "backoffice-disable" |
| 185 | setting does not affect the operation of the manual |
| 186 | "fossil backoffice" command. |
| 187 | Most installations should leave "backoffice-nodelay" and "backoffice-disable" |
| 188 | set to their default values of off and |
| 189 | leave "backoffice-logfile" unset or set to an empty string. |
| 190 |