Skip to content

Commit

Permalink
less rule log print if not first rule
Browse files Browse the repository at this point in the history
  • Loading branch information
majidaldo committed Feb 8, 2025
1 parent 7e941fb commit 1fdfad5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rdf_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# reset to 0 if issues
__version__ = "217"
__version__ = "218"

from .engine import Engine, logger
7 changes: 4 additions & 3 deletions src/rdf_engine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def process(qs):
yield from _

from .db import ingest
for r in self.rules: # TODO: could be parallelized:
for ir, r in enumerate(self.rules): # TODO: could be parallelized:
# before
if hasattr(self, 'logging'):
if self.logging.print:
Expand All @@ -105,8 +105,9 @@ def process(qs):
if self.logging.print:
s = self.logging.log[-1]
width = 6
logger.info(' '+f"{s.new:<{width}} quads in {s.time}s" )
del s
qi = 'quads in'
logger.info(' '+f"{s.new:<{width}} {qi if ir==0 else ' '*len(qi)} {s.time}s" )
del s, width, qi
# so if a rule returns a string,
# it /could/ go in fast in the case of no processing (canon/deanon)
del _
Expand Down

0 comments on commit 1fdfad5

Please sign in to comment.