mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-09-06 05:53 pm

[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 [staff profile] mark.

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
--------------------------------------------------------------------------------
yvi: Kaylee half-smiling, looking very pretty (Default)

[personal profile] yvi 2009-09-07 09:21 am (UTC)(link)
Oooh, shiny-in-progress!