Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the backoffice delay so that it extends the deadline for the follow-on process if the current process runs overtime. This prevents multiple follow-ons.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256:5542cd43b3fe305c41009ff4f6c1e6ddf3562cf00ecfb8a8959ae12ac21753d3
User & Date: drh 2018-07-19 02:37:09
Context
2018-07-19
02:37
Fix the backoffice delay so that it extends the deadline for the follow-on process if the current process runs overtime. This prevents multiple follow-ons. Leaf check-in: 5542cd43 user: drh tags: trunk
2018-07-18
20:32
The pop3d command allows the username to contain an extra @domain suffix. check-in: 86b0a3d3 user: drh tags: trunk
Changes

Changes to src/backoffice.c.

222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
...
247
248
249
250
251
252
253












      }
      backoffice_work();
      break;
    }
    /* This process needs to queue up and wait for the current lease
    ** to expire before continuing. */
    x.idNext = idSelf;
    x.tmNext = x.tmCurrent + BKOFCE_LEASE_TIME;
    backofficeWriteLease(&x);
    db_end_transaction(0);
    if( x.tmCurrent >= tmNow ){
      sqlite3_sleep(1000*(x.tmCurrent - tmNow + 1));
    }else{
      if( lastWarning+30 < tmNow ){
        fossil_warning(
................................................................................
/*
** This routine runs to do the backoffice processing.  When adding new
** backoffice processing tasks, add them here.
*/
void backoffice_work(void){
  email_auto_exec(0);
}



















|







 







>
>
>
>
>
>
>
>
>
>
>
>
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
...
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
      }
      backoffice_work();
      break;
    }
    /* This process needs to queue up and wait for the current lease
    ** to expire before continuing. */
    x.idNext = idSelf;
    x.tmNext = (tmNow>x.tmCurrent ? tmNow : x.tmCurrent) + BKOFCE_LEASE_TIME;
    backofficeWriteLease(&x);
    db_end_transaction(0);
    if( x.tmCurrent >= tmNow ){
      sqlite3_sleep(1000*(x.tmCurrent - tmNow + 1));
    }else{
      if( lastWarning+30 < tmNow ){
        fossil_warning(
................................................................................
/*
** This routine runs to do the backoffice processing.  When adding new
** backoffice processing tasks, add them here.
*/
void backoffice_work(void){
  email_auto_exec(0);
}

/*
** COMMAND: test-backoffice
**
** Usage: test-backoffice
**
** Run backoffice processing
*/
void test_backoffice_command(void){
  db_find_and_open_repository(0,0);
  backoffice_run();
}