@@ 37-47 (lines=11) @@ | ||
34 | */ |
|
35 | class PurgeChangedPages extends Maintenance { |
|
36 | ||
37 | public function __construct() { |
|
38 | parent::__construct(); |
|
39 | $this->addDescription( 'Send purge requests for edits in date range to squid/varnish' ); |
|
40 | $this->addOption( 'starttime', 'Starting timestamp', true, true ); |
|
41 | $this->addOption( 'endtime', 'Ending timestamp', true, true ); |
|
42 | $this->addOption( 'htcp-dest', 'HTCP announcement destination (IP:port)', false, true ); |
|
43 | $this->addOption( 'sleep-per-batch', 'Milliseconds to sleep between batches', false, true ); |
|
44 | $this->addOption( 'dry-run', 'Do not send purge requests' ); |
|
45 | $this->addOption( 'verbose', 'Show more output', false, false, 'v' ); |
|
46 | $this->setBatchSize( 100 ); |
|
47 | } |
|
48 | ||
49 | public function execute() { |
|
50 | global $wgHTCPRouting; |
@@ 32-41 (lines=10) @@ | ||
29 | * @ingroup Maintenance |
|
30 | */ |
|
31 | class PurgeList extends Maintenance { |
|
32 | public function __construct() { |
|
33 | parent::__construct(); |
|
34 | $this->addDescription( 'Send purge requests for listed pages to squid' ); |
|
35 | $this->addOption( 'purge', 'Whether to update page_touched.', false, false ); |
|
36 | $this->addOption( 'namespace', 'Namespace number', false, true ); |
|
37 | $this->addOption( 'all', 'Purge all pages', false, false ); |
|
38 | $this->addOption( 'delay', 'Number of seconds to delay between each purge', false, true ); |
|
39 | $this->addOption( 'verbose', 'Show more output', false, false, 'v' ); |
|
40 | $this->setBatchSize( 100 ); |
|
41 | } |
|
42 | ||
43 | public function execute() { |
|
44 | if ( $this->hasOption( 'all' ) ) { |