Fossil SCM

Add the backoffice-disable setting to completely disable all backoffice processing.

drh 2018-11-30 01:11 trunk
Commit 2467a356fe772457b211e67eff4de932f39be9598d078ca51c335b67f326ea2c
--- src/backoffice.c
+++ src/backoffice.c
@@ -382,10 +382,11 @@
382382
383383
if( backofficeDb ) return;
384384
if( g.zRepositoryName==0 ) return;
385385
if( g.db==0 ) return;
386386
if( !db_table_exists("repository","config") ) return;
387
+ if( db_get_boolean("backoffice-disable",0) ) return;
387388
tmNow = time(0);
388389
backofficeReadLease(&x);
389390
if( x.tmNext>=tmNow && backofficeProcessExists(x.idNext) ){
390391
/* Another backoffice process is already queued up to run. This
391392
** process does not need to do any backoffice work. */
392393
--- 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
+14
--- src/db.c
+++ src/db.c
@@ -3030,10 +3030,24 @@
30303030
** SETTING: backoffice-nodelay boolean default=off
30313031
** If backoffice-nodelay is true, then the backoffice processing
30323032
** will never invoke sleep(). If it has nothing useful to do,
30333033
** it simply exits.
30343034
*/
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
+*/
30353049
/*
30363050
** SETTING: backoffice-logfile width=40
30373051
** If backoffice-logfile is not an empty string and is a valid
30383052
** filename, then a one-line message is appended to that file
30393053
** every time the backoffice runs. This can be used for debugging,
30403054
--- 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
--- www/backoffice.md
+++ www/backoffice.md
@@ -166,11 +166,11 @@
166166
> fossil test-backoffice-lease -R _REPOSITORY_
167167
168168
Running that command every few seconds should show what is going on with
169169
backoffice processing in a particular repository.
170170
171
-There are also two settings that control backoffice behavior. The
171
+There are also settings that control backoffice behavior. The
172172
"backoffice-nodelay" setting prevents the "next" process from taking a
173173
lease and sleeping. If "backoffice-nodelay" is set, that causes all
174174
backoffice processes to exit either immediately or after doing whatever
175175
backoffice works needs to be done. If something is going wrong and
176176
backoffice leases are causing delays in webpage processing, then setting
@@ -177,7 +177,13 @@
177177
"backoffice-nodelay" to true can work around the problem until the bug
178178
can be fixed. The "backoffice-logfile" setting is the name of a log
179179
file onto which is appended a short message everything a backoffice
180180
process actually starts to do the backoffice work. This log file can
181181
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
183189
leave "backoffice-logfile" unset or set to an empty string.
184190
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button