zulip/zephyr/management/commands
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
..
__init__.py Add a management command to populate the database. 2012-08-28 12:45:10 -04:00
activate_mit.py Implement MIT signups. 2012-10-29 16:59:37 -04:00
add_users_to_streams.py Move action functions from models.py to zephyr/lib/actions.py. 2013-01-11 16:11:03 -05:00
banish_broken.py banish_broken: Fix handling of jesstess|MIT.EDU@mit.edu. 2012-12-04 10:59:26 -05:00
clear_db.py Cut out duplicated code between clear_database and populate_db. 2012-10-29 14:54:18 -04:00
create_realm.py Move action functions from models.py to zephyr/lib/actions.py. 2013-01-11 16:11:03 -05:00
create_user.py Move action functions from models.py to zephyr/lib/actions.py. 2013-01-11 16:11:03 -05:00
dump_passwords.py dump_pointers and dump_passwords: Add error handling for deleted users. 2012-12-14 17:15:32 -05:00
dump_pointers.py Rename zephyr.lib.time to zephyr.lib.timestamp. 2013-01-11 15:58:19 -05:00
dump_useractivity.py Rename zephyr.lib.time to zephyr.lib.timestamp. 2013-01-11 15:58:19 -05:00
expunge_db.py Implement a command to expunge old UserMessages and Messages from the database 2012-11-30 17:24:37 -05:00
expunge_logs.py Implement a command to expunge old entries from log files 2012-11-30 17:24:37 -05:00
populate_db.py Move action functions from models.py to zephyr/lib/actions.py. 2013-01-11 16:11:03 -05:00
print_initial_password.py print_initial_password: Print API keys too 2012-10-17 18:23:01 -04:00
runtornado.py tornado: Get User and UserProfile objects from a memcached. 2013-01-11 16:11:07 -05:00
set_default_streams.py Move action functions from models.py to zephyr/lib/actions.py. 2013-01-11 16:11:03 -05:00
test_deactivate.py Add command to mark users as inactive. 2012-12-13 14:15:31 -05:00
test_messages.txt populated_db: Rename many functions/variables from zephyr => message. 2012-10-03 18:14:15 -04:00
update_mit_fullnames.py Move action functions from models.py to zephyr/lib/actions.py. 2013-01-11 16:11:03 -05:00