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

refactor(backend_log): improve getBackendLog #926

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

pano9000
Copy link
Contributor

Hi

this PR aims to improve the getBackendLog function in the backend_log route:

most notable:

  • I've replaced the synchronous reading of the file with an async reading, which makes more sense for a backend api function
  • error handling is more user friendly, as they get back an actual message instead of just an empty string

@pano9000 pano9000 changed the title refactor(backend_log): refactor(backend_log): improve getBackendLog Jan 11, 2025
using synchronous functions on the backend
is not recommended, as it is "blocking the event loop", i.e. no other tasks get executed/processed,
while the file is being read
handle errors more "user friendly" and actually
let the user know, that either the file is not
existing (yet), or that reading the log failed.
@pano9000 pano9000 force-pushed the refactor_backend_log branch from 2aa249a to 949c4ac Compare January 12, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant