Skip to content

Commit

Permalink
Merge pull request #152 from PanDAWMS/ATLASPANDA-799
Browse files Browse the repository at this point in the history
ATLASPANDA-799
  • Loading branch information
tkorchug authored Mar 29, 2023
2 parents e531862 + a4e7b68 commit 62dc32b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions core/common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,8 @@ class JediDatasets(models.Model):
destination = models.CharField(max_length=180, db_column='destination', blank=True)
nfilesonhold = models.IntegerField(null=True, db_column='nfilesonhold', blank=True)
templateid = models.BigIntegerField(db_column='templateid', blank=True)

if 'ORACLE' in settings.DEPLOYMENT:
nfileswaiting = models.IntegerField(null=True, db_column='nfileswaiting', blank=True)
nfilesmissing = models.IntegerField(null=True, db_column='nfilesmissing', blank=True)
nfileswaiting = models.IntegerField(null=True, db_column='nfileswaiting', blank=True)
nfilesmissing = models.IntegerField(null=True, db_column='nfilesmissing', blank=True)

class Meta:
db_table = f'"{settings.DB_SCHEMA_PANDA}"."jedi_datasets"'
Expand Down
11 changes: 5 additions & 6 deletions core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -5727,12 +5727,11 @@ def taskInfo(request, jeditaskid=0):
for inc in inctrs:
for ds in dsets:
if ds['containername'] == inc['containername']:
inc['nfiles'] += ds['nfiles'] if ds['nfiles'] else 0
inc['nfilesfinished'] += ds['nfilesfinished'] if ds['nfilesfinished'] else 0
inc['nfilesfailed'] += ds['nfilesfailed'] if ds['nfilesfailed'] else 0
inc['nfilesmissing'] += ds['nfilesmissing'] if ds['nfilesmissing'] else 0
inc['pct'] = math.floor(100.0 * inc['nfilesfinished'] / inc['nfiles']) if ds['nfiles'] and ds[
'nfiles'] > 0 else inc['pct']
inc['nfiles'] += ds['nfiles'] if 'nfiles' in ds and ds['nfiles'] else 0
inc['nfilesfinished'] += ds['nfilesfinished'] if 'nfilesfinished' in ds and ds['nfilesfinished'] else 0
inc['nfilesfailed'] += ds['nfilesfailed'] if 'nfilesfailed' in ds and ds['nfilesfailed'] else 0
inc['nfilesmissing'] += ds['nfilesmissing'] if 'nfilesmissing' in ds and ds['nfilesmissing'] else 0
inc['pct'] = math.floor(100.0 * inc['nfilesfinished'] / inc['nfiles']) if ds['nfiles'] and ds['nfiles'] > 0 else inc['pct']

outctrs.extend(
list(set([ds['containername'] for ds in dsets if ds['type'] in ('output', 'log') and ds['containername']])))
Expand Down

0 comments on commit 62dc32b

Please sign in to comment.