журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12458: LJSUP-13238: Calendar promo stage 2 - re...

Committer: nnikulochkina
LJSUP-13238: Calendar promo stage 2 - reminder links
U   trunk/bin/maint/selfpromo.pl
U   trunk/bin/maint/taskinfo-local.txt
Modified: trunk/bin/maint/selfpromo.pl
===================================================================
--- trunk/bin/maint/selfpromo.pl	2012-08-14 11:32:07 UTC (rev 12457)
+++ trunk/bin/maint/selfpromo.pl	2012-08-14 11:37:05 UTC (rev 12458)
@@ -59,21 +59,12 @@
 
     # notify promoter about start/stop/ not ready items
     LJ::Pay::CommercialPromo->notify_promoters($slot) if $slot;
-};
 
-# run as often as we did it for commercial_check (every minute)
-$maint{'find_cheapest_commercial'} = sub {
-    my $arg = shift;
-
-    my $slot = LJ::Pay::PromotionSlot->find_slot(class => PROMO_COMMERCIAL());
-    my $memkey = $slot->memcache_cheapest_key;
-
-    my $cheapest_promotion = LJ::Pay::CommercialPromo->find_cheapest_promotion;
-
-    if ($cheapest_promotion) {
+    # find the cheapest commercial promotion
+    if (my $cheapest_promotion = LJ::Pay::CommercialPromo->find_cheapest_promotion) {
+        my $memkey = $slot->memcache_cheapest_key;
         LJ::MemCache::set( $memkey, $cheapest_promotion->promoid, 300 );
     }
 };
 
-
 1;

Modified: trunk/bin/maint/taskinfo-local.txt
===================================================================
--- trunk/bin/maint/taskinfo-local.txt	2012-08-14 11:32:07 UTC (rev 12457)
+++ trunk/bin/maint/taskinfo-local.txt	2012-08-14 11:37:05 UTC (rev 12458)
@@ -68,4 +68,3 @@
   notificationpromo_check - Check the current entry promoted via NotificationPromo if it still should be promoted (not deleted / became ineligible / expired)
   commercial_create - Create promotions for sell in advance.
   commercial_check - Check current promoter object
-  find_cheapest_commercial - Find the cheapest promotion object

Tags: ljcom, nikulochkina, nnikulochkina, pl, txt
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments