refactor(backend): removed unused functions
This commit is contained in:
parent
5e5b2fda5f
commit
43cb952435
@ -40,7 +40,6 @@ app.add_middleware(
|
|||||||
)
|
)
|
||||||
|
|
||||||
app.mount("/_next", StaticFiles(directory="templates/_next"), name="static")
|
app.mount("/_next", StaticFiles(directory="templates/_next"), name="static")
|
||||||
app.mount("/_next/image", StaticFiles(directory="templates/_next"), name="static")
|
|
||||||
app.mount("/img", StaticFiles(directory="templates/img"), name="static")
|
app.mount("/img", StaticFiles(directory="templates/img"), name="static")
|
||||||
|
|
||||||
# ROUTES
|
# ROUTES
|
||||||
@ -66,9 +65,6 @@ def simulate_current_gear(simcprofile: Annotated[str, Form()]):
|
|||||||
.add_args(html_export)
|
.add_args(html_export)
|
||||||
.run())
|
.run())
|
||||||
|
|
||||||
# response = FileResponse(export_path)
|
|
||||||
# remove_temp_files(profile_path, export_path)
|
|
||||||
|
|
||||||
return FileResponse(export_path)
|
return FileResponse(export_path)
|
||||||
|
|
||||||
# HELPER Functions
|
# HELPER Functions
|
||||||
@ -91,11 +87,6 @@ def create_sim_arguments(profile_data: str):
|
|||||||
|
|
||||||
return profile_path
|
return profile_path
|
||||||
|
|
||||||
def remove_temp_files(profile_path: str, export_path: str):
|
|
||||||
time.sleep(1)
|
|
||||||
os.remove(export_path)
|
|
||||||
os.remove(profile_path)
|
|
||||||
|
|
||||||
@functools.lru_cache(maxsize=2)
|
@functools.lru_cache(maxsize=2)
|
||||||
def read_file_with_lru_cache(file_path):
|
def read_file_with_lru_cache(file_path):
|
||||||
# Read the file content
|
# Read the file content
|
||||||
|
Loading…
x
Reference in New Issue
Block a user