2 # vim:fileencoding=utf-8
6 from google
.appengine
.ext
import webapp
7 from google
.appengine
.ext
.webapp
.util
import run_wsgi_app
9 class Userdedup(webapp
.RequestHandler
):
12 for u
in gaetalk
.User
.all():
14 users
[u
.jid
].append(u
)
17 for k
, v
in users
.items():
20 v
.sort(key
=lambda u
: gaetalk
.STATUS_LIST
.index(u
.avail
))
21 logging
.error(' '.join([x
.avail
for x
in v
]))
23 l
= gaetalk
.Log(msg
=u
'删除重复用户', jid
=i
.jid
,
24 nick
=i
.nick
, type='misc')
27 self
.response
.out
.write(u
'OK.'.encode('utf-8'))
29 application
= webapp
.WSGIApplication(
31 ('/_admin/userdedup', Userdedup
),
36 run_wsgi_app(application
)
38 if __name__
== "__main__":