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

perf: mediainfo router should use async/await to get file info #656

Merged
merged 11 commits into from
Nov 29, 2023

Conversation

trim21
Copy link
Collaborator

@trim21 trim21 commented Jul 26, 2023

Description

current mediainfo will block nodejs process, use async/await to avoid blocking

now we are targeting to node18, so also upgrade "@types/node" to ^18

Related Issue

Screenshots

Types of changes

  • Breaking change (changes that break backward compatibility of public API or CLI - semver MAJOR)
  • New feature (non-breaking change which adds functionality - semver MINOR)
  • Bug fix (non-breaking change which fixes an issue - semver PATCH)

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (572ce1e) 77.09% compared to head (47d44f5) 77.18%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #656      +/-   ##
==========================================
+ Coverage   77.09%   77.18%   +0.09%     
==========================================
  Files          61       62       +1     
  Lines       11313    11376      +63     
  Branches     1284     1292       +8     
==========================================
+ Hits         8722     8781      +59     
- Misses       2577     2579       +2     
- Partials       14       16       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jesec
Copy link
Owner

jesec commented Jul 29, 2023

Looks good in general. Thanks for the PR.

Some nits:

  • Don't bump the versionof Node.js type yet. We still want to maintain compatibility as much as possible. If we do want to bump, make clear what features require it.
  • I think we can use fs.promises. instead of having a fsp

@trim21
Copy link
Collaborator Author

trim21 commented Jul 29, 2023

Looks good in general. Thanks for the PR.

Some nits:

  • Don't bump the versionof Node.js type yet. We still want to maintain compatibility as much as possible. If we do want to bump, make clear what features require it.
  • I think we can use fs.promises. instead of having a fsp

OK, I revert version of @types/node back to 12

server/util/async.ts Outdated Show resolved Hide resolved
@trim21 trim21 requested a review from jesec August 3, 2023 04:27
@trim21 trim21 enabled auto-merge (squash) November 29, 2023 06:56
@trim21 trim21 disabled auto-merge November 29, 2023 06:57
@trim21 trim21 enabled auto-merge (squash) November 29, 2023 07:29
@trim21 trim21 merged commit 713b1d9 into jesec:master Nov 29, 2023
12 checks passed
@trim21 trim21 deleted the mediainfo-async-await branch December 9, 2023 06:32
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.

2 participants