Don't double load freshly loaded allocations
This commit is contained in:
parent
de74239430
commit
ea7b8b1a11
|
@ -80,7 +80,9 @@ async function qualifyAllocation() {
|
||||||
|
|
||||||
// Make sure the allocation is a complete record and not a partial so we
|
// Make sure the allocation is a complete record and not a partial so we
|
||||||
// can show information such as preemptions and rescheduled allocation.
|
// can show information such as preemptions and rescheduled allocation.
|
||||||
await allocation.reload();
|
if (allocation.isPartial) {
|
||||||
|
await allocation.reload();
|
||||||
|
}
|
||||||
|
|
||||||
if (allocation.get('job.isPending')) {
|
if (allocation.get('job.isPending')) {
|
||||||
// Make sure the job is loaded before starting the stats tracker
|
// Make sure the job is loaded before starting the stats tracker
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { inject as service } from '@ember/service';
|
import { inject as service } from '@ember/service';
|
||||||
import { computed } from '@ember/object';
|
import { computed } from '@ember/object';
|
||||||
import { equal } from '@ember/object/computed';
|
import { equal, none } from '@ember/object/computed';
|
||||||
import Model from 'ember-data/model';
|
import Model from 'ember-data/model';
|
||||||
import attr from 'ember-data/attr';
|
import attr from 'ember-data/attr';
|
||||||
import { belongsTo, hasMany } from 'ember-data/relationships';
|
import { belongsTo, hasMany } from 'ember-data/relationships';
|
||||||
|
@ -43,6 +43,11 @@ export default Model.extend({
|
||||||
isRunning: equal('clientStatus', 'running'),
|
isRunning: equal('clientStatus', 'running'),
|
||||||
isMigrating: attr('boolean'),
|
isMigrating: attr('boolean'),
|
||||||
|
|
||||||
|
// An allocation model created from any allocation list response will be lacking
|
||||||
|
// many properties (some of which can always be null). This is an indicator that
|
||||||
|
// the allocation needs to be reloaded to get the complete allocation state.
|
||||||
|
isPartial: none('allocationTaskGroup'),
|
||||||
|
|
||||||
// When allocations are server-side rescheduled, a paper trail
|
// When allocations are server-side rescheduled, a paper trail
|
||||||
// is left linking all reschedule attempts.
|
// is left linking all reschedule attempts.
|
||||||
previousAllocation: belongsTo('allocation', { inverse: 'nextAllocation' }),
|
previousAllocation: belongsTo('allocation', { inverse: 'nextAllocation' }),
|
||||||
|
|
Loading…
Reference in New Issue