[dw-free] Start indexing all posts, not just paid users. This is in preparation for site search, we
[commit: http://hg.dwscoalition.org/dw-free/rev/f50d67506b08]
Start indexing all posts, not just paid users. This is in preparation for
site search, we want to start getting posts indexed sooner rather than
later.
Patch by
mark.
Files modified:
Start indexing all posts, not just paid users. This is in preparation for
site search, we want to start getting posts indexed sooner rather than
later.
Patch by
![[staff profile]](https://www.dreamwidth.org/img/silk/identity/user_staff.png)
Files modified:
- bin/worker/sphinx-copier
-------------------------------------------------------------------------------- diff -r 7c93014f55ee -r f50d67506b08 bin/worker/sphinx-copier --- a/bin/worker/sphinx-copier Sun Sep 06 17:01:07 2009 +0000 +++ b/bin/worker/sphinx-copier Sun Sep 06 17:53:16 2009 +0000 @@ -26,7 +26,6 @@ package DW::Worker::Sphinx::Copier; package DW::Worker::Sphinx::Copier; use base 'TheSchwartz::Worker'; use Encode; -use DW::Pay; use LJ::DBUtil; sub work { @@ -46,16 +45,7 @@ sub work { # we have to use utf8 when we write to the db $dbto->do( 'SET NAMES \'utf8\'' ); - # if this is a free user, then it's easy - my $ps = DW::Pay::get_paid_status( $u ); - unless ( $ps && ( $ps->{permanent} || $ps->{expiresin} > 0 ) ) { - warn "[$$] Removing " . $u->user . "(" . $u->id . ") from the index [free user]...\n"; - $dbto->do( 'DELETE FROM posts_raw WHERE journal_id = ?', undef, $u->id ); - die $dbto->errstr if $dbto->err; - return $job->completed; - } - - # they're a paid user of some sort, so get the posts we know about + # figure out which posts the search db knows my $sphinx_times = $dbto->selectall_hashref( 'SELECT jitemid, revtime FROM posts_raw WHERE journal_id = ?', 'jitemid', undef, $u->id --------------------------------------------------------------------------------