print debug on staging.rdrama.net
parent
aa1cc8fb5f
commit
fff0b9c0c5
|
@ -350,11 +350,23 @@ class User(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def all_blocks(self):
|
def all_blocks(self):
|
||||||
|
t = int(time.time())
|
||||||
stealth = set([x[0] for x in g.db.query(Sub.name).filter_by(stealth=True).all()])
|
stealth = set([x[0] for x in g.db.query(Sub.name).filter_by(stealth=True).all()])
|
||||||
stealth = stealth - set([x[0] for x in g.db.query(SubJoin.sub).filter_by(user_id=self.id).all()])
|
print(1, time.time() - t, flush=True)
|
||||||
if self.agendaposter == 1: stealth = stealth - {'chudrama'}
|
|
||||||
|
|
||||||
return list(stealth) + [x[0] for x in g.db.query(SubBlock.sub).filter_by(user_id=self.id).all()]
|
t = int(time.time())
|
||||||
|
stealth = stealth - set([x[0] for x in g.db.query(SubJoin.sub).filter_by(user_id=self.id).all()])
|
||||||
|
print(2, time.time() - t, flush=True)
|
||||||
|
|
||||||
|
t = int(time.time())
|
||||||
|
if self.agendaposter == 1: stealth = stealth - {'chudrama'}
|
||||||
|
print(3, time.time() - t, flush=True)
|
||||||
|
|
||||||
|
t = int(time.time())
|
||||||
|
x = list(stealth) + [x[0] for x in g.db.query(SubBlock.sub).filter_by(user_id=self.id).all()]
|
||||||
|
print(4, time.time() - t, flush=True)
|
||||||
|
|
||||||
|
return x
|
||||||
|
|
||||||
@lazy
|
@lazy
|
||||||
def blocks(self, sub):
|
def blocks(self, sub):
|
||||||
|
|
Loading…
Reference in New Issue