aboutsummaryrefslogtreecommitdiff
path: root/src/gui_backend_slurm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-04-01 11:38:44 +0200
committerThomas White <taw@physics.org>2021-04-01 15:08:14 +0200
commitc5f62f02be9fd29eb3f8f7831ac98617752ea789 (patch)
tree3f6c2512ad9cc233328e30aaa2f6f0c27fcec16c /src/gui_backend_slurm.c
parentbb383134d7f2d15578b77186f5b35e6b8c344b71 (diff)
GUI: Clean up old tasks when infobar is removed
Diffstat (limited to 'src/gui_backend_slurm.c')
-rw-r--r--src/gui_backend_slurm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index ed49c4c6..1da344ce 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -222,6 +222,14 @@ static int get_task_status(void *job_priv,
}
+static void free_task(void *job_priv)
+{
+ struct slurm_job *job = job_priv;
+ g_object_unref(job->workdir);
+ free(job->stderr_filename);
+}
+
+
static void cancel_task(void *job_priv)
{
char jobid[128];
@@ -1050,6 +1058,7 @@ int make_slurm_backend(struct crystfel_backend *be)
be->friendly_name = "SLURM";
be->cancel_task = cancel_task;
+ be->free_task = free_task;
be->task_status = get_task_status;
be->make_indexing_parameters_widget = make_indexing_parameters_widget;