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

feat: adding service jobs, i.e. the ability to define jobs that provide a resource for consumers (like a shared memory device or a database), and will be automatically terminated by Snakemake once all consumers are finished. #1413

Merged
merged 5 commits into from Feb 22, 2022

Conversation

johanneskoester
Copy link
Contributor

@johanneskoester johanneskoester commented Feb 21, 2022

Description

THis PR adds service jobs to Snakemake. Such jobs are executed along with all their consumers and automatically terminated once all consumers are finished. This can for example be used to model the loading of common resources into shared memory, ramdisks, database access, etc.

rule star_load:
    input:
        "genome.fasta"
    output:
        service("genome.fasta.index")
    grouplocal: True  # see PR #1414
    shell:
        "star genomeLoad ..."


rule star_map:
    input:
        "genome.fasta.index",
        "reads.fq"
    output:
        "mapped.bam"
    shell:
        "star mapReads ..."

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

…ating job is expected to stay active until the file is not needed anymore by consuming jobs
@johanneskoester johanneskoester changed the title feat: service jobs feat: adding service jobs, i.e. the ability to define jobs that provide a resource for consumers (like a shared memory device or a database), and will be automatically terminated by Snakemake once all consumers are finished. Feb 21, 2022
@sonarcloud
Copy link

sonarcloud bot commented Feb 22, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester johanneskoester merged commit a471adb into main Feb 22, 2022
6 of 7 checks passed
@johanneskoester johanneskoester deleted the service-jobs branch Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant