Skip to content

Commit 3f4e83f

Browse files
authored
fix: don't block ping while running subtraction elimination
1 parent 10a504d commit 3f4e83f

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: ci
1+
name: CI
22

33
on:
44
pull_request:
@@ -24,6 +24,7 @@ jobs:
2424
- name: commitlint
2525
uses: wagoid/commitlint-github-action@v5
2626
build:
27+
name: Build
2728
runs-on: ubuntu-24.04
2829
steps:
2930
- name: Checkout
@@ -39,6 +40,7 @@ jobs:
3940
cache-from: type=gha
4041
cache-to: type=gha,mode=max
4142
test:
43+
name: Test
4244
runs-on: ubuntu-24.04
4345
steps:
4446
- name: Checkout
@@ -57,6 +59,7 @@ jobs:
5759
- name: Test
5860
run: docker run --rm -t ${{ steps.build.outputs.imageid }} poetry run pytest
5961
release:
62+
name: "Publish / Release"
6063
runs-on: ubuntu-24.04
6164
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
6265
needs: [build, commitlint, test]
@@ -77,6 +80,7 @@ jobs:
7780
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7881
run: npx semantic-release
7982
ghcr:
83+
name: "Publish / GHCR"
8084
runs-on: ubuntu-24.04
8185
if: |
8286
github.repository_owner == 'Virtool' &&

workflow.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ def subtract_fastq(
4646
new_fastq_path: Path,
4747
subtracted_reads: set[str],
4848
):
49-
with open(current_fastq_path) as current_fastq_file, open(
50-
new_fastq_path,
51-
"w",
52-
) as new_fastq_file:
49+
with (
50+
open(current_fastq_path) as current_fastq_file,
51+
open(
52+
new_fastq_path,
53+
"w",
54+
) as new_fastq_file,
55+
):
5356
for record in read_fastq_grouped_lines(current_fastq_file):
5457
if record[0].strip("@\n") not in subtracted_reads:
5558
new_fastq_file.write("".join(record))
@@ -284,7 +287,8 @@ async def eliminate_subtraction(
284287
],
285288
)
286289

287-
run_eliminate_subtraction(
290+
await asyncio.to_thread(
291+
run_eliminate_subtraction,
288292
str(current_sam_input_path),
289293
str(to_subtraction_sam_path),
290294
str(subtracted_sam_path),

0 commit comments

Comments
 (0)