Ejemplo n.º 1
0
    # price_task_class.update_price,          # 900 secs now          # 400 secs originally

    base_price.calculate_min_max_price,     # 25 secs on monster    # 50 secs on mba
    promo_item_trans.processItemPromo,      # 5 secs on monster     # 15 secs on mba
    promo_item_trans.process_promo_detail,  # 5 secs on monster     # 25 secs
    promo_item_trans.process_gift_value,    # << 1 secs
    worthy_mix.generate_worthy_mix_main,    # 180 secs on monster   # 140 secs on mba
    rotate_index.execute_rotate_index,      # 13 secs on monster    # 10 secs on mba
    rotate_index.flush_memcache_content,    # << 1  secs
    rotate_index.re_cache,                  # 35 secs on monster    # 10 secs on mba

    # notification
    history_lowest.update_history_lowest_store,     # << 1 secs
    history_lowest.temp_sendSMS,                    # 2 secs
]

if __name__ == '__main__':

    task_logging.configLogging('analytic_discount')

    wp = WorthyProcessBase(
        function_list=func_list,
        is_daily=False,
        start_hour=0, # no use
        interval_secs=60*120, # 120 mins
        min_sleep=60*10 # 20 mins
    )
    wp.run_tasks_repeated()

Ejemplo n.º 2
0
# encoding: utf-8

from datasys import timeHelper
import time
import worthy_analytics.rating_diff, worthy_analytics.base_price, worthy_analytics.base_rating, worthy_analytics.promo_item_trans
from worthy_analytics import rating_percentile
from process_class import WorthyProcessBase
import task_logging


func_list = [
    # worthy_analytics.base_rating.calculate_base_rating_for_categories,
    # worthy_analytics.rating_diff.calculate_rating_diff,
    rating_percentile.calculateSkuRatingScores,
    rating_percentile.calculatePercentile,
]

if __name__ == "__main__":

    task_logging.configLogging('analytic_rating')

    wp = WorthyProcessBase(
        function_list=func_list,
        is_daily=True,
        start_hour=8,
        interval_secs=900, #no-use
        min_sleep=600
    )

    wp.run_tasks_repeated()
    
Ejemplo n.º 3
0
# encoding: utf-8

from datasys import timeHelper
import time
import worthy_analytics.rating_diff, worthy_analytics.base_price, worthy_analytics.base_rating, worthy_analytics.promo_item_trans
from worthy_analytics import rating_percentile
from process_class import WorthyProcessBase
import task_logging

func_list = [
    # worthy_analytics.base_rating.calculate_base_rating_for_categories,
    # worthy_analytics.rating_diff.calculate_rating_diff,
    rating_percentile.calculateSkuRatingScores,
    rating_percentile.calculatePercentile,
]

if __name__ == "__main__":

    task_logging.configLogging('analytic_rating')

    wp = WorthyProcessBase(
        function_list=func_list,
        is_daily=True,
        start_hour=8,
        interval_secs=900,  #no-use
        min_sleep=600)

    wp.run_tasks_repeated()