Skip to content

Commit

Permalink
Fix error in frontend not showing files in home, fix 500 error in dat…
Browse files Browse the repository at this point in the history
…asets populating, fix job runner not running jobs that have another job before them in chain that is in waiting state
  • Loading branch information
glormph committed Nov 21, 2024
1 parent c454a5a commit 04e1aa1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/backend/home/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,13 @@ def populate_proj(dbprojs, user, showjobs=True, include_db_entry=False):

def populate_dset(dsids, dbdsets, user):
dsets = OrderedDict()
jobmap = defaultdict(dict)
jobmap = defaultdict(list)
for job in jm.Job.objects.filter(
filejob__storedfile__rawfile__datasetrawfile__dataset_id__in=dsids
).exclude(state__in=jj.JOBSTATES_DONE).distinct('pk').values('state', 'pk',
'filejob__storedfile__rawfile__datasetrawfile__dataset_id'):
dsid = job['filejob__storedfile__rawfile__datasetrawfile__dataset_id']
jobmap[dsid][str(job['pk'])] = job['state']
jobmap[dsid].append((str(job['pk']), job['state']))
for dset in dbdsets.values('pk', 'deleted', 'runname__experiment__project__projtype__ptype_id',
'runname__experiment__name', 'runname__experiment__project__projtype__ptype__name',
'runname__experiment__project__name', 'runname__name', 'datatype__name',
Expand Down
2 changes: 1 addition & 1 deletion src/backend/jobs/management/commands/runjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_ready_jobs(job_fn_map, job_ds_map, active_jobs):
# Jobs that changed to waiting are excluded from active
# Jobs that are on HOLD also, because they will get added to active when encountered
# This way they will only seen as active to jobs after the held job
wait_jobs = Job.objects.filter(state=[Jobstates.WAITING, Jobstates.HOLD],
wait_jobs = Job.objects.filter(state__in=[Jobstates.WAITING, Jobstates.HOLD],
pk__in=active_jobs).values('pk')
active_jobs.difference_update([x['pk'] for x in wait_jobs])
for job in jobs_not_finished:
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/home/src/Files.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let fetchingCleanup = false;
let treatItems;
const tablefields = [
{id: 'jobs', name: '__hourglass-half', type: 'state', multi: true, links: 'job_ids', linkroute: '#/jobs'},
{id: 'jobstate', name: '__hourglass-half', type: 'state', multi: true, links: 'job_ids', linkroute: '#/jobs'},
{id: 'name', name: 'File', type: 'str', multi: false},
{id: 'smallstatus', name: '', type: 'smallcoloured', multi: true},
{id: 'dataset', name: '', type: 'icon', help: 'Dataset', icon: 'clipboard-list', multi: false, links: 'dataset', linkroute: '#/datasets'},
Expand Down

0 comments on commit 04e1aa1

Please sign in to comment.