sunnyman's (sunnyman) wrote in changelog,
sunnyman's
sunnyman
changelog

[ljcom] r12002: LJSUP-12173: Implement worker to create ...

Committer: vtroitsky
LJSUP-12173: Implement worker to create future promotions for CommPromo
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-05-24 08:29:57 UTC (rev 12001)
+++ trunk/bin/maint/selfpromo.pl	2012-05-24 09:32:57 UTC (rev 12002)
@@ -8,6 +8,8 @@
 use LJ::Pay::PromotionSlot qw(:classes :regions);
 use LJ::Pay::PromotedObject qw(:types);
 
+use LJ::Pay::CommercialPromo;
+
 $maint{'selfpromo_check'} = sub {
     # Iterate through all slots available
     for my $region qw(ua cyr) {
@@ -18,4 +20,10 @@
     }
 };
 
+$maint{'commercial_create'} = sub {
+    # Create additional slots for sell in commercial promo
+    my $slot = LJ::Pay::PromotionSlot->find_slot(class => PROMO_COMMERCIAL());
+    LJ::Pay::CommercialPromo->create_promotions($slot) if $slot;
+};
+
 1;

Modified: trunk/bin/maint/taskinfo-local.txt
===================================================================
--- trunk/bin/maint/taskinfo-local.txt	2012-05-24 08:29:57 UTC (rev 12001)
+++ trunk/bin/maint/taskinfo-local.txt	2012-05-24 09:32:57 UTC (rev 12002)
@@ -65,3 +65,4 @@
 
 selfpromo.pl:
   selfpromo_check - Check the current entry promoted via SelfPromo if it still should be promoted (not deleted / became ineligible / expired)
+  commercial_create - Create promotions for sell in advance.

Tags: ljcom, pl, sunnyman, txt, vtroitsky
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