go back by one day and add in cron (bug 809631)

This commit is contained in:
Andy McKay 2012-11-08 11:04:14 -08:00
Родитель b02fc95ef6
Коммит 6330a5b5d0
5 изменённых файлов: 17 добавлений и 4 удалений

Просмотреть файл

@ -75,7 +75,8 @@ def update_webtrends(date=None, urlbases=WEBTRENDS_URLS):
if date:
date = datetime.datetime.strptime(date, '%Y-%m-%d').date()
else:
date = datetime.date.today()
# Assume that we want to populate yesterdays stats by default.
date = datetime.date.today() - datetime.timedelta(days=1)
datestr = date.strftime('%Ym%md%d')
urls = ['%s&start_period=%s&end_period=%s&format=json'
% (u, datestr, datestr) for u in urlbases]

Просмотреть файл

@ -58,6 +58,9 @@ HOME=/tmp
45 23 * * * %(django)s dump_apps
55 23 * * * %(z_cron)s clean_out_addonpremium
# Once per day, populate yesterdays totals from webtrends
50 2 * * * %(z_cron)s update_webtrends --settings=settings_local_mkt
#Once per day after 2100 PST (after metrics is done)
35 21 * * * %(z_cron)s update_addon_download_totals
40 21 * * * %(z_cron)s weekly_downloads

Просмотреть файл

@ -135,3 +135,6 @@ SIGNED_APPS_SERVER_ACTIVE = False
METLOG_CONF['logger'] = 'addons-marketplace-dev'
METLOG_CONF['plugins']['raven'] = ('metlog_raven.raven_plugin:config_plugin', {'dsn': private_mkt.SENTRY_DSN})
METLOG = client_from_dict_config(METLOG_CONF)
WEBTRENDS_USERNAME = settings.WEBTRENDS_USERNAME
WEBTRENDS_PASSWORD = settings.WEBTRENDS_PASSWORD

Просмотреть файл

@ -110,3 +110,6 @@ SIGNING_SERVER = private_mkt.SIGNING_SERVER
SIGNING_SERVER_ACTIVE = True
CARRIER_URLS = splitstrip(private_mkt.CARRIER_URLS)
WEBTRENDS_USERNAME = settings.WEBTRENDS_USERNAME
WEBTRENDS_PASSWORD = settings.WEBTRENDS_PASSWORD

Просмотреть файл

@ -96,14 +96,17 @@ APP_PREVIEW = True
WEBAPPS_UNIQUE_BY_DOMAIN = True
WAFFLE_SUFFIX = WAFFLE_TABLE_SUFFIX = 'mkt'
SENTRY_DSN = private_mkt.SENTRY_DSN
METRICS_SERVER = 'https://data.mozilla.com/'
VALIDATOR_IAF_URLS = ['https://marketplace.mozilla.org',
VALIDATOR_IAF_URLS = ['https://marketplace.mozilla.org',
'https://marketplace.allizom.org',
'https://marketplace-dev.allizom.org']
SECLUSION_HOSTS = ('https://payments.allizom.org',)
GEOIP_NOOP = 0
WEBTRENDS_USERNAME = settings.WEBTRENDS_USERNAME
WEBTRENDS_PASSWORD = settings.WEBTRENDS_PASSWORD