Skip to content

Commit

Permalink
Merge pull request #1310 from mskcc/feature/add_tool_level_walltime
Browse files Browse the repository at this point in the history
Feature/add tool level walltime
  • Loading branch information
sivkovic authored Jan 10, 2024
2 parents 66d63a8 + 061c806 commit dac2d76
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
28 changes: 28 additions & 0 deletions runner/migrations/0058_auto_20231114_1310.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 2.2.28 on 2023-11-14 18:10

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("runner", "0057_auto_20230424_0743"),
]

operations = [
migrations.AddField(
model_name="pipeline",
name="tool_walltime",
field=models.IntegerField(blank=True, null=True),
),
migrations.AlterField(
model_name="run",
name="restart_attempts",
field=models.IntegerField(default=0),
),
migrations.AlterField(
model_name="run",
name="resume_attempts",
field=models.IntegerField(default=3),
),
]
1 change: 1 addition & 0 deletions runner/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class Pipeline(BaseModel):
operator = models.ForeignKey(Operator, on_delete=models.SET_NULL, null=True, blank=True)
default = models.BooleanField(default=False)
walltime = models.IntegerField(blank=True, null=True)
tool_walltime = models.IntegerField(blank=True, null=True)
memlimit = models.CharField(blank=True, null=True, max_length=20)
config = models.CharField(blank=True, null=True, max_length=1000, default=None)

Expand Down
2 changes: 2 additions & 0 deletions runner/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ def submit_job(run_id, output_directory=None, execution_id=None, log_directory=N
url = settings.RIDGEBACK_URL + "/v0/jobs/"
if run.app.walltime:
job["walltime"] = run.app.walltime
if run.app.tool_walltime:
job["tool_walltime"] = run.app.tool_walltime
if run.app.memlimit:
job["memlimit"] = run.app.memlimit
if run.app.output_permission:
Expand Down

0 comments on commit dac2d76

Please sign in to comment.