Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compilation timestamp in log #3563

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion reflex/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import os
import platform
import sys
from datetime import datetime
from typing import (
Any,
AsyncIterator,
Expand Down Expand Up @@ -836,6 +837,9 @@ def _compile(self, export: bool = False):
"""
from reflex.utils.exceptions import ReflexRuntimeError

def get_compilation_time() -> str:
return str(datetime.now().time()).split(".")[0]

# Render a default 404 page if the user didn't supply one
if constants.Page404.SLUG not in self.pages:
self.add_custom_404_page()
Expand All @@ -861,7 +865,7 @@ def _compile(self, export: bool = False):
fixed_pages_within_executor = 5
progress.start()
task = progress.add_task(
"Compiling:",
f"[{get_compilation_time()}] Compiling:",
total=len(self.pages)
+ fixed_pages_within_executor
+ adhoc_steps_without_executor,
Expand Down
Loading