First implementation of questions management
This commit is contained in:
@@ -49,9 +49,11 @@ class SheerkaAdmin(BaseService):
|
||||
|
||||
try:
|
||||
start = time.time_ns()
|
||||
nb_lines = 0
|
||||
self.sheerka.during_restore = True
|
||||
with open(concept_file, "r") as f:
|
||||
for line in f.readlines():
|
||||
nb_lines += 1
|
||||
line = line.strip()
|
||||
if line == "" or line.startswith("#"):
|
||||
continue
|
||||
@@ -65,7 +67,7 @@ class SheerkaAdmin(BaseService):
|
||||
nano_sec = stop - start
|
||||
dt = nano_sec / 1e6
|
||||
elapsed = f"{dt} ms" if dt < 1000 else f"{dt / 1000} s"
|
||||
print(f"Execution time: {elapsed}")
|
||||
print(f"Imported {nb_lines} line(s) in {elapsed}.")
|
||||
except IOError:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user