Skip to content

Commit

Permalink
clean up; upd version
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed May 8, 2024
1 parent bad4746 commit f2e09e6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[package]
name = "sourmash_plugin_directsketch"
version = "0.2.0"
version = "0.2.1"
edition = "2021"

[lib]
Expand Down
5 changes: 0 additions & 5 deletions src/directsketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::sync::Arc;
use tokio::fs::File;
use tokio::io::{AsyncWriteExt, BufWriter};
use tokio::sync::Semaphore;
use tokio::time::Duration;
use tokio_util::compat::Compat;

use pyo3::prelude::*;
Expand Down Expand Up @@ -615,11 +614,8 @@ pub async fn download_and_sketch(
handles.push(failures_handle);

// // Worker tasks
// let client = Client::new();
let semaphore = Arc::new(Semaphore::new(3)); // Limiting concurrent downloads
let client = Arc::new(Client::new());
// let semaphore = Arc::new(Semaphore::new(3)); // Allows up to 3 concurrent tasks
let mut interval = tokio::time::interval(Duration::from_secs(1));

// Open the file containing the accessions synchronously
let (accession_info, n_accs) = load_accession_info(input_csv)?;
Expand All @@ -643,7 +639,6 @@ pub async fn download_and_sketch(

for (i, accinfo) in accession_info.into_iter().enumerate() {
py.check_signals()?; // If interrupted, return an Err automatically
// interval.tick().await; // Wait for the next interval tick before continuing
let semaphore_clone = Arc::clone(&semaphore);
let client_clone = Arc::clone(&client);
let send_sigs = send_sigs.clone();
Expand Down

0 comments on commit f2e09e6

Please sign in to comment.