server: Pass through user_id to classify handler.

This commit is contained in:
Stuart Longland 2018-03-02 18:44:01 +10:00
parent aa0334abbc
commit 6b69f93861
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -283,8 +283,7 @@ class ClassifyHandler(AuthAdminRequestHandler):
return
db = self.application._db
def _exec():
def _exec(db, user_id):
user_id = int(user_id)
log = self.application._log.getChild('classify[%d]' % user_id)
@ -481,7 +480,7 @@ class ClassifyHandler(AuthAdminRequestHandler):
return user
# Execute the above in a worker thread
user = yield self.application._pool.apply(_exec)
user = yield self.application._pool.apply(_exec, (db, user_id))
self.set_status(200)
self.write(json.dumps({