Skip to content

Commit

Permalink
protcur server avoid tag population logspam
Browse files Browse the repository at this point in the history
  • Loading branch information
tgbugs committed Aug 27, 2023
1 parent b62ee1b commit 178795f
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions protcur/protcur/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,6 @@ def make_server_app(memfile=None, comments=True):
helpers=helpers)
stream_thread.start()

# FIXME put this on AstGeneric
for t in justTags():
protc._tagIndex[t] = set()
Hybrid._tagIndex[t] = set()

for h in helpers:
h._annos_list = annos
if not h._annos_list:
Expand All @@ -599,6 +594,17 @@ def make_server_app(memfile=None, comments=True):
[h(a, h._annos_list) for a in h._annos_list] # TODO stepping stone to passing annos as a dict
[o.populateTags() for o in h]

# FIXME put this on AstGeneric
for t in justTags():
# this must run after populating the helpers otherwise
# e.g. Hybrid will produce counless warnings because it
# needs replies to populate tags
if t not in protc._tagIndex:
protc._tagIndex[t] = set()

if t not in Hybrid._tagIndex:
Hybrid._tagIndex[t] = set()

app = make_app(annos)
make_sparc(app, comments=comments)

Expand Down

0 comments on commit 178795f

Please sign in to comment.