Commit eb53409c authored by 王浩's avatar 王浩

Merge branch 'haow/dev' into 'test'

fix code

See merge request alpha/saturn!93
parents 92ecf990 3be054ce
......@@ -28,8 +28,13 @@ class CreatePictorial(BaseView):
ins_cache.delete(obj)
def get_random_user_id(self):
index = randint(0, 5000)
return self.user_id_start + index
while True:
index = randint(0, 5000)
user_id = self.user_id_start + index
error, data = self.call_rpc('venus/community/user/is_shadow', user_id=user_id)
ret = data.get('user_id')
if ret:
return user_id
def get_user_id(self, id_, platform):
cache_key = 'grap:{}:{}'.format(platform, id_)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment