Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
Go to file
Tim Abbott 3b7d61e45f tornado: Get User and UserProfile objects from a memcached.
This commit has the effect of eliminating all of the non-UserActivity
database queries from the Tornado process -- at least in the uncached
case.

This is safe to do, if a bit fragile, since our Tornado code only
accesses these objects (as opposed to their IDs) in a few places that
are all fine with old data, and I don't expect us to add any new ones
soon:

* UserActivity logging, which I plan to move out of Tornado entirely

* Checking whether we're authenticated in our decorators (which could
  be simplified -- the actual security check is just whether the
  Django session object has a particular field)

* Checking the user realm for whether we should sync to the client
  notices about their Zephyr mirror being up to date, which is quite
  static and I think we can move out of this code path.

But implementation constraints around mapping the user_ids to
user_profile_ids mean that it makes sense to get the actual objects
for now.

This code is not what I want to do long-term.  I expect we'll be able
to clean up the dual User/UserProfile nonsense once we integrate the
upcoming Django 1.5 release, with its support for pluggable User
models, and after that I change, I expect it'll be fairly easy to make
the Tornado code only work with the user ID, not the actual objects.

(imported from commit 82e25b62fd0e3af7c86040600c63a4deec7bec06)
2013-01-11 16:11:07 -05:00
api populate_db: Remove obsolete mit_subs_list. 2013-01-08 17:23:22 -05:00
certs SSL certificates for zephyr.humbughq.com 2012-11-21 13:58:48 -05:00
confirmation Include autogenerated initial migrations for South. 2013-01-08 18:14:39 -05:00
humbug tornado: Get User and UserProfile objects from a memcached. 2013-01-11 16:11:07 -05:00
servers nagios: revamp check_user_zephyr_mirror_liveness to monitor sudden drops in mirror use. 2013-01-08 10:53:33 -05:00
templates Notify the user when someone is speaking at them 2013-01-09 20:18:39 -05:00
tools Add tools/test-backend script to run backend tests. 2013-01-10 16:59:36 -05:00
zephyr tornado: Get User and UserProfile objects from a memcached. 2013-01-11 16:11:07 -05:00
.gitignore Add .swp and .swo files to the gitignore for vim 2012-12-19 15:07:03 -05:00
manage.py chmod +x manage.py 2012-10-25 15:22:18 -04:00