make logging not use f-str, change others to f-str (#22882)

This commit is contained in:
Asuka Minato
2025-07-25 11:32:48 +09:00
committed by GitHub
parent 570aee5fe6
commit a189d293f8
164 changed files with 557 additions and 563 deletions

View File

@@ -18,7 +18,7 @@ def handle(sender, **kwargs):
documents = []
start_at = time.perf_counter()
for document_id in document_ids:
logging.info(click.style("Start process document: {}".format(document_id), fg="green"))
logging.info(click.style(f"Start process document: {document_id}", fg="green"))
document = (
db.session.query(Document)
@@ -42,7 +42,7 @@ def handle(sender, **kwargs):
indexing_runner = IndexingRunner()
indexing_runner.run(documents)
end_at = time.perf_counter()
logging.info(click.style("Processed dataset: {} latency: {}".format(dataset_id, end_at - start_at), fg="green"))
logging.info(click.style(f"Processed dataset: {dataset_id} latency: {end_at - start_at}", fg="green"))
except DocumentIsPausedError as ex:
logging.info(click.style(str(ex), fg="yellow"))
except Exception: