Commit Graph

2008 Commits

Author SHA1 Message Date
Keith Mitchell
d76e586de3 pep257: Use double guotes in promote.py and bidding.py 2012-10-24 12:55:29 -07:00
Keith Mitchell
1c33743002 code review: Store live promotions as C* data 2012-10-24 12:55:29 -07:00
Keith Mitchell
6bfa552398 tdb_cassandra: Magic up the _ttl attribute for ThingMeta users 2012-10-24 12:55:29 -07:00
Keith Mitchell
e34e8d8d3e Store live promotions as structured C* data
Initially this is dual-write only
2012-10-24 12:55:28 -07:00
Keith Mitchell
6828c6940f bidding.py: Honor g.db_create_tables 2012-10-24 12:54:22 -07:00
Keith Mitchell
b5c9d44ea9 Remove unused import from message.compact 2012-10-24 12:54:13 -07:00
Keith Mitchell
7b2dcb3cf6 Remove unused utility/template_helpers alternatives to query_string 2012-10-24 12:54:08 -07:00
Keith Mitchell
e954889640 query_string(): mako.url_escape expects unicode 2012-10-24 12:53:53 -07:00
shlurbee
d712c2d7ef New promoted traffic page
Splits promo traffic apart into tabs: one for the link traffic, one that shows
campaign traffic stats in a table, and another tab for settings (which is just
viewer list right now.)

Gated by VSponsorAdmin for testing/feedback.
2012-10-23 16:52:16 -07:00
shlurbee
ca1eb8686b Fix traffic viewer messaging
Updates traffic viewer emails to use new message string locations. Fixes
a bug that was preventing emails from being sent when a new traffic viewer
was added.
2012-10-23 16:52:13 -07:00
shlurbee
30bceec164 Remove old fixme
Verified that payment is working correctly. Fixme no longer needed.
2012-10-23 16:52:11 -07:00
shlurbee
aefb174c48 Allow sponsors/admins to edit live campaign
Allows admins/sponsors to edit some campaign fields even after the ad has gone
live. Target can be changed at any time. Bid can only be changed for freebies.
2012-10-23 16:52:07 -07:00
Logan Hanks
1da78397c3 Make @g.stats.amqp_processor flush stats. 2012-10-23 14:30:13 -07:00
Logan Hanks
1468f32a2a Drop in replacement code for python-statsd. 2012-10-23 14:30:13 -07:00
Neil Williams
16d0b1c480 query_cache: Add support for precomputed queries. 2012-10-23 14:30:13 -07:00
bsimpson63
33400828c0 PromotionLog CF and dual write.
PromotionLog will replace the old promotion_log, which was a list
attribute on promoted links.
2012-10-19 12:56:17 -07:00
bsimpson63
1c935d530b Cleanup in promote. 2012-10-19 12:56:17 -07:00
Neil Williams
8fc311487d Add a Pig-based map/reduce system for filling the new query cache. 2012-10-19 12:56:17 -07:00
Neil Williams
89e0f79da3 query_cache: Only allow iteration over MAX_CACHED_ITEMS.
Items at the end of the query are almost guaranteed to be a huge jump
from those in the non-pruned part of the query.  To avoid confusion,
we'll cut off the query at MAX_CACHED_ITEMS which is still imperfect,
but better.
2012-10-19 12:55:33 -07:00
bsimpson63
c03a291ccf Delete temporary rendering attributes from the user.
Using safe_set_attr makes the Account not dirty, but it sets the
attributes directly on the object rather than in the _t dict. If the
account was later _commit()'ed it would get stuck with these extra
attributes.
2012-10-19 12:55:33 -07:00
Neil Williams
a6da54dcfd Add missing gold checkout stuff to example.ini. 2012-10-16 14:03:08 -07:00
Neil Williams
dc0906ff4d ads: Get rid of an unsightly gap between the 300x100 and the border. 2012-10-16 14:03:08 -07:00
Neil Williams
d481f2d84b ads: Make frontpage_dart not override ads-by-codename.
This fixes an issue where /ads/:codename: links would show only the
homepage roadblock ad when frontpage_dart = True.
2012-10-16 14:03:08 -07:00
Logan Hanks
ae8b8fe541 Extend the oauth2 access token TTL to an hour. 2012-10-15 15:09:04 -07:00
Logan Hanks
e73cc90077 Clean up markup for oauth2 client names and about links. 2012-10-15 15:09:04 -07:00
Logan Hanks
f094e3fa2b Add support for "permanent" OAuth 2 grants.
If a client sends a user to the authorization page with a
"duration=permanent" parameter, we'll create a refresh token in addition
to the initial access token. When the client fetches the initial access
token with the authorization code, the refresh token will also be returned.
The client can then obtain new access tokens using the refresh token
instead of an authorization code.

Both refresh tokens and access tokens will be displayed on the user's apps
page (as well as the IP history page).
2012-10-15 15:09:04 -07:00
shlurbee
f45c5ecf92 Python style tweaks
As requested by spladug
2012-10-15 13:01:36 -07:00
shlurbee
2e16521693 Fix promote calendar
Promotion calendar code was still using the link.campaigns attribute which
no longer exists. This change updates it to use PromoCampaign things instead.

Fixes a bug where new promotions were not showing up in promoted/graph.
2012-10-15 13:01:33 -07:00
shlurbee
bdf0e81e95 Upstart job to update inventory prediction metrics 2012-10-15 13:01:27 -07:00
shlurbee
11481c3611 Remove campaign dual-writes
Removes leftover dual-writes from the PromoCampaign thing migration
2012-10-15 13:01:18 -07:00
Max Goodman
a84ad12960 Revert "Remove unused UserList.addable property."
It turns out it wasn't so unused. :(

This reverts commit 984585d54b681d721d33ec614e9b58ae2f39cf2a.
2012-10-12 15:38:27 -07:00
Neil Williams
e191b3866e install-reddit: Upgrade to Ubuntu 12.04 LTS (Precise Pangolin)
Two packages got renamed:

python-pybabel -> python-babel
python-python-statsd -> python-statsd
2012-10-11 14:36:29 -07:00
Neil Williams
408d53a983 install-reddit: Add python-kazoo dependency. 2012-10-11 14:36:29 -07:00
Neil Williams
4a5f5c7cb5 install-reddit: Make sure to enable the haproxy service. 2012-10-11 14:36:29 -07:00
Neil Williams
c63d336010 install-reddit: Disable consumers that aren't configured by default.
cloudsearch_q and scraper_q rely on external services (Amazon
CloudSearch and embed.ly respectively) that must be configured manually
before they will run properly. To avoid a spew of useless error messages
after installation, we'll just set the consumer counts to zero.
2012-10-11 14:36:29 -07:00
Neil Williams
548091fae9 install-reddit: Use template0 for CREATE DATABASE for UTF-8 safety.
template0 is the base template that should be immutable, while template1
is the site-customized version. PostgreSQL defaults to using template1
when doing CREATE DATABASE. Unfortunately, in some situations, template1
will have an encoding set that makes it impossible for us to CREATE
the reddit database with UTF-8 encoding.
2012-10-11 14:36:29 -07:00
Neil Williams
e4b827ceee install-reddit: Fix apt-add-repository wanting user input. 2012-10-11 14:36:29 -07:00
Neil Williams
0c0efaf141 install-reddit: Allow domain to be configured at install time.
Automated runs of the installer need to be able to configure the
domain ahead of time to ensure that the site will come up in a valid
state. The install script will now check for an environment variable,
REDDIT_DOMAIN, and use that value if it is present. If not present,
it will default to the previous "reddit.local".
2012-10-11 14:36:29 -07:00
Neil Williams
88662070a2 setup.py: Update dependencies now that they're all officially released. 2012-10-11 14:36:29 -07:00
Neil Williams
79446e2f60 query_cache: Clean up cjson remnants.
It was removed because it's actually rather buggy.
2012-10-11 14:36:29 -07:00
Max Goodman
228753f70b Fix editable value for UserList rows.
The most dangerous lines are the ones that look too simple to consider.
2012-10-10 11:25:55 -07:00
Neil Williams
cf68046674 query_cache: Limit prune deletion size for safety.
If prunings fail, the number of items in a fast-moving cached query
could grow rather large.  This prevents a bad case where the pruning
ends up way too big and fails itself, causing the query to snowball in
size.
2012-10-10 11:23:24 -07:00
Neil Williams
8c62ace8bb query_cache: Add lots of documentation. 2012-10-10 11:23:24 -07:00
Neil Williams
2ef0a7f452 query_cache: Assert that the decorated function starts with get_. 2012-10-10 11:23:24 -07:00
Neil Williams
30b404005e query_cache: Remove unused parameter from fetch. 2012-10-10 11:23:24 -07:00
Neil Williams
2bd87bf16c query_cache: Mark some classes as module-private. 2012-10-10 11:23:24 -07:00
Neil Williams
e2c9d98062 query_cache: Get rid of "update" method and clean up classes.
Update isn't even possible for the pure-Cassandra queries, and is
dreadfully slow on the SQL backed queries.  If we need to recalculate
queries, they should be done from a map/reduce job.
2012-10-10 11:23:24 -07:00
Neil Williams
5c2c0e67e7 query_cache: PEP-8 and whitespace tweaks. 2012-10-10 11:23:24 -07:00
bsimpson63
96845173b5 Separate SqlCachedQuery and CassandraCachedQuery.
Original CachedQuery assumed an underlying SQL query to be cached.
New CassandraCachedQuery can cache arbitrary Things by a specified
sort. SqlCachedQuery has same behavior as CachedQuery.
2012-10-10 11:23:21 -07:00
Neil Williams
eec49ad45c CommentPaneCache: time uncached views, cache hits, and cache misses.
This should give us a little more insight into how much work the
CommentPaneCache is doing.
2012-10-10 10:35:31 -07:00