Skip to content

Commit

Permalink
[ENG-1398] Make thumbnailer parallelism configurable (#1780)
Browse files Browse the repository at this point in the history
* Removing migrator

* Adding serde_repr dep

* Generalizing version manager

* Updating library config to use version manager

* Updating node config to use version manager

* Updating stuff to use new configs

* More async

* Library manager errors

* Node and thumbnailer preferences

* Small warning on prep

* Upgrading batch construction for thumbnailer

* Updating thumb version file to new version manager

* Configurable parallelism for thumbnailer

* Integration with frontend and refresh batch

Co-authored-by: Vítor Vasconcellos <[email protected]>

---------

Co-authored-by: Vítor Vasconcellos <[email protected]>
  • Loading branch information
fogodev and HeavenVolkoff committed Nov 23, 2023
1 parent 43b6453 commit f662bf7
Show file tree
Hide file tree
Showing 35 changed files with 1,737 additions and 1,285 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apps/desktop/src-tauri/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ pub async fn reveal_items(
.location()
.find_many(vec![
// TODO(N): This will fall apart with removable media and is making an invalid assumption that the `Node` is fixed for an `Instance`.
location::instance_id::equals(Some(library.config().instance_id)),
location::instance_id::equals(Some(library.config().await.instance_id)),
location::id::in_vec(locations),
])
.select(location::select!({ path }))
Expand Down
1 change: 1 addition & 0 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ tokio = { workspace = true, features = [
serde = { version = "1.0", features = ["derive"] }
chrono = { version = "0.4.31", features = ["serde"] }
serde_json = { workspace = true }
serde_repr = "0.1"
futures = "0.3"
rmp-serde = "^1.1.2"
rmpv = "^1.0.1"
Expand Down
4 changes: 2 additions & 2 deletions core/src/api/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
};

if node.config
.write(|mut c| c.auth_token = Some(token))
.write(|c| c.auth_token = Some(token))
.await.is_err() {
break Response::Error;
};
Expand Down Expand Up @@ -120,7 +120,7 @@ pub(crate) fn mount() -> AlphaRouter<Ctx> {
"logout",
R.mutation(|node, _: ()| async move {
node.config
.write(|mut c| c.auth_token = None)
.write(|c| c.auth_token = None)
.await
.map(|_| ())
.map_err(|_| {
Expand Down
Loading

0 comments on commit f662bf7

Please sign in to comment.