Fossil SCM
Remove the /test-backoffice-lease webpage, since it doesn't really work correctly. Use only the "fossil test-backoffice-lease" command moving forward. We can wrap that command in a Wapp script if necessary.
Commit
b6aadace396e54c6370c6eaae56eda275049bdad87af5705da0f0413df38df25
Parent
353a4e12d598f65…
1 file changed
-74
-74
| --- src/backoffice.c | ||
| +++ src/backoffice.c | ||
| @@ -164,18 +164,10 @@ | ||
| 164 | 164 | */ |
| 165 | 165 | void backoffice_no_delay(void){ |
| 166 | 166 | backofficeNoDelay = 1; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | -/* | |
| 170 | -** Signal that the backoffice should not be run at the conclusion of | |
| 171 | -** the current session. | |
| 172 | -*/ | |
| 173 | -void backoffice_do_not_run(void){ | |
| 174 | - backofficeDb = "x"; | |
| 175 | -} | |
| 176 | - | |
| 177 | 169 | /* |
| 178 | 170 | ** Sleeps for the specified number of milliseconds -OR- until interrupted |
| 179 | 171 | ** by another thread (if supported by the underlying platform). Non-zero |
| 180 | 172 | ** will be returned if the sleep was interrupted. |
| 181 | 173 | */ |
| @@ -441,76 +433,10 @@ | ||
| 441 | 433 | }else{ |
| 442 | 434 | fossil_print("\n"); |
| 443 | 435 | } |
| 444 | 436 | } |
| 445 | 437 | |
| 446 | - | |
| 447 | -/* | |
| 448 | -** WEBPAGE: test-backoffice-lease | |
| 449 | -** | |
| 450 | -** Print out information about the backoffice "lease" entry in the | |
| 451 | -** config table that controls whether or not backoffice should run. | |
| 452 | -*/ | |
| 453 | -void test_backoffice_lease_page(void){ | |
| 454 | - sqlite3_int64 tmNow = time(0); | |
| 455 | - Lease x; | |
| 456 | - const char *zLease; | |
| 457 | - login_check_credentials(); | |
| 458 | - if( !g.perm.Setup ){ | |
| 459 | - login_needed(0); | |
| 460 | - return; | |
| 461 | - } | |
| 462 | - style_header("Backoffice Lease"); | |
| 463 | - backoffice_do_not_run(); | |
| 464 | - @ <table class='label-value'> | |
| 465 | - zLease = db_get("backoffice",""); | |
| 466 | - @ <tr><th>Now:</th><td>%lld(tmNow)</td></tr> | |
| 467 | - @ <tr><th>Lease:</th><td colspan="3">"%h(zLease)"</td></tr> | |
| 468 | - backofficeReadLease(&x); | |
| 469 | - @ <tr><th>idCurrent:</th><td>%lld(x.idCurrent)</td><td> </td><td>\ | |
| 470 | - if( backofficeProcessExists(x.idCurrent) ){ | |
| 471 | - @ (exists) \ | |
| 472 | - } | |
| 473 | - if( backofficeProcessDone(x.idCurrent) ){ | |
| 474 | - @ (done) \ | |
| 475 | - } | |
| 476 | - @ </td></tr> | |
| 477 | - @ <tr><th>tmCurrent:</th><td>%lld(x.tmCurrent)</td><td></td><td>\ | |
| 478 | - if( x.tmCurrent>0 ){ | |
| 479 | - @ (now%+lld(x.tmCurrent-tmNow)) \ | |
| 480 | - } | |
| 481 | - @ </td></tr> | |
| 482 | - @ <tr><th>idNext:</th><td>%lld(x.idNext)</td><td> </td><td>\ | |
| 483 | - if( backofficeProcessExists(x.idNext) ){ | |
| 484 | - @ (exists) \ | |
| 485 | - } | |
| 486 | - if( backofficeProcessDone(x.idNext) ){ | |
| 487 | - @ (done) \ | |
| 488 | - } | |
| 489 | - @ </td></tr> | |
| 490 | - @ <tr><th>tmNext:</th><td>%lld(x.tmNext)</td><td></td><td>\ | |
| 491 | - if( x.tmNext>0 ){ | |
| 492 | - @ (now%+lld(x.tmNext-tmNow)) \ | |
| 493 | - } | |
| 494 | - @ </td></tr> | |
| 495 | -#ifndef _WIN32 | |
| 496 | - if( P("fds")!=0 ){ | |
| 497 | - int i; | |
| 498 | - @ <tr><th>open fds:</th><td colspan="3"> | |
| 499 | - for(i=0; i<1000; i++){ | |
| 500 | - int rc = fcntl(i, F_GETFL, 0); | |
| 501 | - if( rc<0 ) continue; | |
| 502 | - @ %d(i) \ | |
| 503 | - } | |
| 504 | - @ </td></tr> | |
| 505 | - } | |
| 506 | -#endif | |
| 507 | - | |
| 508 | - @ </table> | |
| 509 | - style_footer(); | |
| 510 | -} | |
| 511 | - | |
| 512 | 438 | /* |
| 513 | 439 | ** If backoffice processing is needed set the backofficeDb variable to the |
| 514 | 440 | ** name of the database file. If no backoffice processing is needed, |
| 515 | 441 | ** this routine makes no changes to state. |
| 516 | 442 | */ |
| 517 | 443 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -164,18 +164,10 @@ | |
| 164 | */ |
| 165 | void backoffice_no_delay(void){ |
| 166 | backofficeNoDelay = 1; |
| 167 | } |
| 168 | |
| 169 | /* |
| 170 | ** Signal that the backoffice should not be run at the conclusion of |
| 171 | ** the current session. |
| 172 | */ |
| 173 | void backoffice_do_not_run(void){ |
| 174 | backofficeDb = "x"; |
| 175 | } |
| 176 | |
| 177 | /* |
| 178 | ** Sleeps for the specified number of milliseconds -OR- until interrupted |
| 179 | ** by another thread (if supported by the underlying platform). Non-zero |
| 180 | ** will be returned if the sleep was interrupted. |
| 181 | */ |
| @@ -441,76 +433,10 @@ | |
| 441 | }else{ |
| 442 | fossil_print("\n"); |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | |
| 447 | /* |
| 448 | ** WEBPAGE: test-backoffice-lease |
| 449 | ** |
| 450 | ** Print out information about the backoffice "lease" entry in the |
| 451 | ** config table that controls whether or not backoffice should run. |
| 452 | */ |
| 453 | void test_backoffice_lease_page(void){ |
| 454 | sqlite3_int64 tmNow = time(0); |
| 455 | Lease x; |
| 456 | const char *zLease; |
| 457 | login_check_credentials(); |
| 458 | if( !g.perm.Setup ){ |
| 459 | login_needed(0); |
| 460 | return; |
| 461 | } |
| 462 | style_header("Backoffice Lease"); |
| 463 | backoffice_do_not_run(); |
| 464 | @ <table class='label-value'> |
| 465 | zLease = db_get("backoffice",""); |
| 466 | @ <tr><th>Now:</th><td>%lld(tmNow)</td></tr> |
| 467 | @ <tr><th>Lease:</th><td colspan="3">"%h(zLease)"</td></tr> |
| 468 | backofficeReadLease(&x); |
| 469 | @ <tr><th>idCurrent:</th><td>%lld(x.idCurrent)</td><td> </td><td>\ |
| 470 | if( backofficeProcessExists(x.idCurrent) ){ |
| 471 | @ (exists) \ |
| 472 | } |
| 473 | if( backofficeProcessDone(x.idCurrent) ){ |
| 474 | @ (done) \ |
| 475 | } |
| 476 | @ </td></tr> |
| 477 | @ <tr><th>tmCurrent:</th><td>%lld(x.tmCurrent)</td><td></td><td>\ |
| 478 | if( x.tmCurrent>0 ){ |
| 479 | @ (now%+lld(x.tmCurrent-tmNow)) \ |
| 480 | } |
| 481 | @ </td></tr> |
| 482 | @ <tr><th>idNext:</th><td>%lld(x.idNext)</td><td> </td><td>\ |
| 483 | if( backofficeProcessExists(x.idNext) ){ |
| 484 | @ (exists) \ |
| 485 | } |
| 486 | if( backofficeProcessDone(x.idNext) ){ |
| 487 | @ (done) \ |
| 488 | } |
| 489 | @ </td></tr> |
| 490 | @ <tr><th>tmNext:</th><td>%lld(x.tmNext)</td><td></td><td>\ |
| 491 | if( x.tmNext>0 ){ |
| 492 | @ (now%+lld(x.tmNext-tmNow)) \ |
| 493 | } |
| 494 | @ </td></tr> |
| 495 | #ifndef _WIN32 |
| 496 | if( P("fds")!=0 ){ |
| 497 | int i; |
| 498 | @ <tr><th>open fds:</th><td colspan="3"> |
| 499 | for(i=0; i<1000; i++){ |
| 500 | int rc = fcntl(i, F_GETFL, 0); |
| 501 | if( rc<0 ) continue; |
| 502 | @ %d(i) \ |
| 503 | } |
| 504 | @ </td></tr> |
| 505 | } |
| 506 | #endif |
| 507 | |
| 508 | @ </table> |
| 509 | style_footer(); |
| 510 | } |
| 511 | |
| 512 | /* |
| 513 | ** If backoffice processing is needed set the backofficeDb variable to the |
| 514 | ** name of the database file. If no backoffice processing is needed, |
| 515 | ** this routine makes no changes to state. |
| 516 | */ |
| 517 |
| --- src/backoffice.c | |
| +++ src/backoffice.c | |
| @@ -164,18 +164,10 @@ | |
| 164 | */ |
| 165 | void backoffice_no_delay(void){ |
| 166 | backofficeNoDelay = 1; |
| 167 | } |
| 168 | |
| 169 | /* |
| 170 | ** Sleeps for the specified number of milliseconds -OR- until interrupted |
| 171 | ** by another thread (if supported by the underlying platform). Non-zero |
| 172 | ** will be returned if the sleep was interrupted. |
| 173 | */ |
| @@ -441,76 +433,10 @@ | |
| 433 | }else{ |
| 434 | fossil_print("\n"); |
| 435 | } |
| 436 | } |
| 437 | |
| 438 | /* |
| 439 | ** If backoffice processing is needed set the backofficeDb variable to the |
| 440 | ** name of the database file. If no backoffice processing is needed, |
| 441 | ** this routine makes no changes to state. |
| 442 | */ |
| 443 |