7956 Commits

Author SHA1 Message Date
MelissaCole
d43d7f9ff9 Disassociate preview object when deleting a Link object 2016-06-20 12:58:09 -07:00
Strix
f56e810a48 fix closing parens/braces in fn reply() 2016-06-17 11:11:13 -07:00
Brian Simpson
8123b9917c TryLater: ready_items key should be the original uuid, not datetime 2016-06-15 13:49:54 -07:00
Brian Simpson
1f93cbbd23 Modaction.create: Don't pass request or c to mod_event if out of request 2016-06-15 13:49:49 -07:00
birakattack
9581950ada Add already exists error to form for duplicate links 2016-06-15 12:08:59 -07:00
Brian Simpson
2cc7c85294 TryLater.run: Make a copy of the all_hooks items to avoid RuntimeError 2016-06-15 11:33:47 -07:00
Brian Simpson
94acb322aa TryLater: Attempt row/timestamp delete to avoid generating tombstones 2016-06-15 11:18:59 -07:00
Brian Simpson
a4bf06235c TryLater: move all processing and cleanup into class method
Previously it was split between the class and the script handler
2016-06-15 11:18:59 -07:00
Brian Simpson
4292df773f TryLater: Use xget to process ALL ready items 2016-06-15 11:18:59 -07:00
Brian Simpson
d4cb4087b5 run_trylater: Flush the stats 2016-06-15 11:18:59 -07:00
Brian Simpson
791e117245 TryLater: Add stats for number of ready items 2016-06-15 11:18:59 -07:00
Brian Simpson
3c031c8db6 TryLater.multi_handle: Document context manager magic 2016-06-15 11:18:59 -07:00
Brian Simpson
777c655f80 VOneTimePassword: Change name to otp_ratelimit to avoid UnboundLocalError 2016-06-15 11:18:59 -07:00
Neil Williams
0d74afb00c Install ZooKeeper in dev and make liveconfig/secrets easier
This installs a ZooKeeper server in development and adds two
configuration options. Live config and Secrets can now be sourced from
either ZooKeeper or the local config. This allows local installs to
continue with the easy workflow of just modifying the INI file to test
out changes, while allowing us to develop ZK features locally as well
(such as throttles).
2016-06-15 11:15:52 -07:00
Greg Taylor
4107deec8b Always pull Drone build image to ensure freshness. 2016-06-15 11:10:31 -07:00
Greg Taylor
2342becdb9 Explicitly set Drone clone path to avoid pathing issues. 2016-06-15 11:10:26 -07:00
Greg Taylor
31b83a3350 Incorporating PEP8 checking on PRs. 2016-06-15 11:10:21 -07:00
Greg Taylor
ade6dfd0c1 Add post-build Drone->Slack notifications. 2016-06-15 11:10:16 -07:00
Greg Taylor
f232301489 Add .drone.yml and install/drone.sh for Drone CI
.drone.yml is used by Drone CI to execute builds in response to pushes to
the repo. install/drone.sh is similar to the existing install/travis.sh in
that it does some final work to prep the environment for running tests.
2016-06-15 11:10:10 -07:00
Brian Simpson
d6eac78d7d VOneTimePassword: Use SimpleRateLimit for ratelimiting 2016-06-14 12:31:59 -07:00
Brian Simpson
922be87457 VRatelimit: Separate name and cache_prefix
Force cache_prefix to start with "rl:" for future routing by mcrouter
2016-06-14 12:31:59 -07:00
Brian Simpson
4eb26ccb2a VRatelimit: Use ratelimitcache 2016-06-14 12:31:55 -07:00
Brian Simpson
363c7ca5ff emailer: Move email reset throttling to SimpleRateLimit 2016-06-14 12:31:29 -07:00
Brian Simpson
4b5a785161 api: Move subreddit quota counts to SimpleRateLimit
This moves them out of g.cache and into g.ratelimitcache
2016-06-14 12:30:37 -07:00
Brian Simpson
7bdc106585 SimpleRateLimit: Prefix key with "rl:" for routing by mcrouter 2016-06-14 12:30:37 -07:00
Brian Simpson
db6f9e4631 Add SimpleRateLimit class for creating simple ad hoc ratelimiters 2016-06-14 12:30:37 -07:00
Brian Simpson
84bea274f6 VRatelimitImproved: Remove call to _record_event when user is exempt
VRatelimitImproved._record_event doesn't exist
2016-06-14 12:30:37 -07:00
Brian Simpson
f5c601299b app_globals: Add "sr_muted_quota" to ConfigValue.int 2016-06-14 12:30:31 -07:00
Chris Slowe
7e5f4a415d Re-allow mods to sticky non-moderator self-posts. 2016-06-13 16:13:50 -07:00
Chris Slowe
599628a6a5 Only check stickyable on unstickied posts. 2016-06-13 16:11:50 -07:00
Chris Slowe
ba9dc13eb5 Change 'sticky' posts to 'announcements' and restrict to self-posts by mods 2016-06-13 15:29:49 -07:00
Brian Simpson
3a97cd0cac Thing._incr: Rollback postgres transaction if cache write fails
This will prevent prevent repeatedly incrementing the postgres value if
the cache operation fails and the entire incr is retried.
2016-06-13 11:03:51 -07:00
Chris Slowe
29e271cc37 Add better explanation around bucketing variant truncation. 2016-06-10 08:53:16 -07:00
Chris Slowe
e448e6a2f7 Fix unit tests, and remove old ones. 2016-06-08 14:27:20 -07:00
Chris Slowe
f2da4f4716 Handle error codes on post_tests.py 2016-06-08 14:18:28 -07:00
Chris Slowe
7cb0085a65 Add new (signed) APIv1 login handler with tests. 2016-06-08 14:00:14 -07:00
Chris Slowe
77acb16055 Re-enable (and fix) login and pref tests.
This fix encountered two python warts: unicode handling and missing __init__.py files.
2016-06-08 11:22:55 -07:00
Jakeable
36fc55578c Fix issue with moderator removal message
When a moderator removes themself, a message would still be sent ([example](https://www.reddit.com/message/messages/5n38ss)). This stops that from happening.

Perhaps a better fix would be to send a slightly different message to the subreddit if a moderator removes themself (e.g. /u/user has removed themself as a moderator of /r/subreddit).
2016-06-07 15:45:29 -07:00
birakattack
0378c0cbf1 Fix unload dialog on duplicate link submissions
The beforeunload event dialog warning was showing up on duplicate link
submissions. This was fixed to redirect to the original link post.
2016-06-07 14:59:04 -07:00
birakattack
901ef7c9fb Improve usability of unload warning for bfcache
Preserve bfcache functionality when users abandon comments. Prevents
handler uneccessarily being loaded.
2016-06-07 14:58:46 -07:00
birakattack
0c6546d586 Fix bfcache on cancelled comments. 2016-06-07 14:58:35 -07:00
Brian Simpson
afed8a4b19 Delete unused CachedUser 2016-06-07 13:28:26 -07:00
Brian Simpson
e3653bb0d2 recommender: Don't cache SRRecommendation._byID lookup
C* should be able to handle these reads.
2016-06-07 13:28:26 -07:00
Brian Simpson
9ef801ce49 search._rebuild_link_index: Don't use g.cache to store progress 2016-06-07 13:28:26 -07:00
Brian Simpson
23198bbd66 Don't set value to g.cache when a user claims a gold code 2016-06-07 13:28:25 -07:00
Brian Simpson
950ff454b5 ipn: Delete g.cache flag 2016-06-07 13:28:04 -07:00
Brian Simpson
b28cc7f392 rendercache: Set TTL to 1 hour 2016-06-07 08:29:12 -07:00
Brian Simpson
d238d64036 emr_helpers.get_step_state: Sort steps by creation time 2016-06-07 08:29:06 -07:00
Lev Alexandrovich Neiman
e7ccd872fa Add has_been_atoed to Account 2016-06-06 13:42:22 -07:00
Brian Simpson
b423fe2bf8 ModeratorInbox: Use g.thingcache 2016-06-02 16:17:35 -07:00