Increase delete_users throughput again, this time with an index

This commit is contained in:
Wil Clouser 2010-08-16 14:04:40 -07:00
Родитель ff72497e5a
Коммит 30d281b647
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -8,7 +8,7 @@ from users.models import UserProfile
task_log = commonware.log.getLogger('z.task')
@task(rate_limit='20/m')
@task(rate_limit='40/m')
def _delete_users(data, **kw):
"""Feed me a list of user ids you want to delete from the database. This
isn't a flag, it actually deletes rows."""

Просмотреть файл

@ -0,0 +1,4 @@
-- This needs to be added on your dev copies, but justdave already ran it on
-- preview and production so I'm commenting it out here.
-- ALTER TABLE addonlogs ADD KEY `user_id` (`user_id`);