Commit Graph

1679 Commits

Author SHA1 Message Date
Jason Harvey
367c4201a3 Add accounts_active information to the JSON template. 2012-08-22 11:04:15 -07:00
Jason Harvey
90fb87da88 Modify display of accounts_active info.
This now relies on the fudged number from subreddit.py for obscurity.

Rewords the default text, and title text of the metric.

Adds a "fudged" class to the block so that low values can be hidden through CSS.
2012-08-22 11:04:15 -07:00
Jason Harvey
97eb911710 Add a random jitter to accounts_activity metric. 2012-08-22 11:04:14 -07:00
Max Goodman
034aeef022 Stop stripping unicode characters from subreddits_by_topic. 2012-08-21 16:37:18 -07:00
Max Goodman
62792b8731 Use SearchQuery in subreddits_by_topic. 2012-08-21 16:37:18 -07:00
Max Goodman
ca2a05fa34 Return Subreddit objects from subreddit_facets(). 2012-08-21 16:37:18 -07:00
Max Goodman
7dbb0ad337 Add faceting param to CloudSearchQuery. 2012-08-21 16:37:17 -07:00
Max Goodman
2a0dfb4f40 Rename "facets" -> "faceting" in search funcs.
To avoid confusion with "facets" in search result sets.
2012-08-21 16:37:17 -07:00
Max Goodman
4208ea88f7 Underline search facets on hover. 2012-08-21 16:37:17 -07:00
Keith Mitchell
3828815524 Try out a hot sort 2012-08-21 14:38:45 -07:00
Keith Mitchell
e89afe9a80 Helper functions should default to the default sort 2012-08-21 14:38:30 -07:00
Keith Mitchell
cc1848b715 Send type_id data to cloudsearch
This minor addition will allow us to combine
different things into a single domain if we so
desire.
2012-08-21 14:38:23 -07:00
Keith Mitchell
a0ef13e4fb Clean up cloudsearch.py
* Domain permutations can be a list of items
* _to_fn() function was redundant
2012-08-21 14:38:16 -07:00
Keith Mitchell
095091dffb promote.py: Need to load the campaign data
In scheduled_campaigns_by_link, a call to PromoCampaign._byID
was referencing data attributes but not requesting data=True
on load.
2012-08-21 14:38:11 -07:00
Neil Williams
30885089bd tdb_sql/Thing: Assume data props should be INSERTed on thing creation.
Previously, setting data props on a thing would result in a SELECT to
determine which data properties already existed, and then a sequence of
INSERTs and UPDATEs (with some batching) to get the database in the
right state.

The account master wasn't too happy with those extra selects, so we
made it so that the app would optimistically UPDATE and if no rows were
changed do INSERTs instead (with appropriate batching as above).

Unfortunately, this greatly increases the number of operations done when
adding new data props, such as at thing creation time, and on some
tables that's almost entirely all of the workload.

This patch takes advantage of the fact that we know no data attributes
will exist at thing creation time and therefore we can blindly INSERT
without doing UPDATEs or SELECTs first to try and reduce the number of
extraneous operations we do.
2012-08-21 14:23:13 -07:00
bsimpson63
2c91a2a18e Cached queries for user reported things. 2012-08-21 14:19:32 -04:00
shlurbee
15d60fb82d Fixes bugs in promotion code:
Updates an occurrence of "index" that should have been changed to campaign._id
during the campaign thing reads change. This fixes two bugs:

(1) Campaigns were being incorrectly marked with "update failed" when edited
by an admin or sponsor even though the update was successful.

(2) Campaigns were not being automatically marked as freebies when edited by
an admin or sponsor. (These have to be set as freebies in self-serve because
they are billed separately.)

This change also checks for an empty user string so the update function can
be run in paster shell.
2012-08-21 14:19:24 -04:00
Max Goodman
7205f9ae03 Spruce up search pages. 2012-08-20 17:34:19 -07:00
Max Goodman
6680a74d78 Add subreddit interest bar to /reddits. 2012-08-20 17:34:19 -07:00
Max Goodman
613b27de9e Add subreddit interest discovery bar. 2012-08-20 17:34:19 -07:00
Max Goodman
df628d4368 Make cloudsearch facet params more configurable. 2012-08-20 17:18:00 -07:00
Max Goodman
754c35da53 Move "lookup" spotlight box var out of template. 2012-08-20 17:18:00 -07:00
Max Goodman
6dfb00105b Refactor spotlight item param names to be more generic. 2012-08-20 17:18:00 -07:00
Max Goodman
c22f9c682b Only use responder output upon None in json_validate. 2012-08-20 17:18:00 -07:00
Max Goodman
70f0e7b274 Replace spotlight box help with a hover bubble. 2012-08-20 17:18:00 -07:00
Max Goodman
b4d90db3b0 Localize "an error occurred" in r.ui.Form. 2012-08-20 17:18:00 -07:00
Max Goodman
5b4f1632cc Whitespace. 2012-08-20 17:18:00 -07:00
Max Goodman
5f1e5f5113 Set g.zookeeper to None if unavailable. 2012-08-20 17:18:00 -07:00
Jason Harvey
c57446bdca Entitize the less-than symbol for the users-online display. 2012-08-20 17:18:00 -07:00
Neil Williams
d8fa5e9099 tdb_sql: Collect stats on wasted UPDATEs in data prop storage.
This will give us better data on which tables will prefer to
SELECT and INSERT and which will prefer to optimistically UPDATE.
2012-08-20 17:16:35 -07:00
Neil Williams
0ca1ceb110 tdb_sql: Remove unused type_id parameter from set_data. 2012-08-20 17:16:17 -07:00
Neil Williams
a24edac21f vote: Start dual-writing to new DenormalizedRelation-based CFs.
See the DenormalizedRelation commit for more details on why.
2012-08-20 12:34:47 -07:00
Neil Williams
1be75fda0e tdb_cassandra: Add DenormalizedRelation infrastructure.
This is intended to replace Relation. Relation works by putting each individual
relationship in its own Row. This means that doing a fast_query (cross-product)
results in a large multiget that likely touches every node on the C* ring.
DenormalizedRelation instead puts all of the relationships into a single row
per thing1 and only fetches the desired columns on read. This means that most
of the time, we'll do a single-row lookup to determine what we want and the
majority of the time we will get a very fast response from the row-level bloom
filters indicating that no such relationship exists.

The row cache should be disabled for this column family as the rows will be
VERY wide.
2012-08-20 12:34:47 -07:00
Neil Williams
be52637af1 vote: Remove VotesByDay view.
We are not currently using this so it is wasteful to keep it around.
2012-08-20 12:34:47 -07:00
Max Goodman
20759d52a1 Add small icon to online users count. 2012-08-17 16:29:32 -07:00
Jason Harvey
dda2a5daeb Add users_online Score. Fix _people and PluralManager to work with it properly.
PluralManager bits from chromakode.
2012-08-17 16:29:31 -07:00
Jason Harvey
f80eb468c0 Display active_accounts in the subreddit infobar.
Add a CSS class for users-online.
2012-08-17 16:29:31 -07:00
Jason Harvey
49607b72d1 Add a memoized method of get_count, and use it by default. 2012-08-17 16:29:30 -07:00
Jason Harvey
1fa2d40f27 Add a Subreddit property for active_accounts. 2012-08-17 16:29:30 -07:00
Jason Harvey
1520ddf057 Rename AccountActivityBySR to AccountsActiveBySR. 2012-08-17 16:29:30 -07:00
Jason Harvey
437079d750 Call update_sr_activity on any activity where c.site is a Subreddit. 2012-08-17 16:29:29 -07:00
Jason Harvey
7e22528221 Add Account method to update AccountActivityBySR. 2012-08-17 16:29:28 -07:00
Jason Harvey
2fe83ed70e Add AccountActivityBySR.
Cassandra View class for storing account activity(the columns) by
subreddit (the keys).

Columns have a TTL of 15 minutes to expire out inactive accounts.
2012-08-17 16:29:28 -07:00
Jason Harvey
b71d8bf749 Store a last_visit time on the Account thing. 2012-08-17 16:29:27 -07:00
Keith Mitchell
6bc99a48af Move 'best' sort to first in list 2012-08-16 16:35:25 -07:00
Keith Mitchell
70f4f79dad Spaces are ok; CRs and LFs are not
Protect against HTTP response splitting* without
overzealously blocking standard space characters
from URLs

* see http://en.wikipedia.org/wiki/HTTP_response_splitting
2012-08-16 16:34:52 -07:00
bsimpson63
a31b1e69f9 Transparent background for eye.png. 2012-08-14 12:21:31 -07:00
Keith Mitchell
07fa695857 Abort with 403 for toolbar links to private SRs 2012-08-14 12:20:40 -07:00
maxwellhansen
9bfed16203 install-reddit: Use newer bash redirection syntax. 2012-08-14 12:19:38 -07:00
Keith Mitchell
98f781957b Remove unnecessary _domain variable 2012-08-14 12:19:31 -07:00