Skip to content

Commit

Permalink
#30: changed std output from process command
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenwh committed Jul 10, 2019
1 parent a730ade commit 398caab
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions geospaas_wind/management/commands/process_sentinel1_wind.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def handle(self, *args, **options):
failed = 0
reprocessed = 0
ingested = 0
already_processed = 0
numds = len(s1ds)
print('Processing %d datasets' %numds)
for i,ds in enumerate(s1ds):
Expand All @@ -59,12 +60,17 @@ def handle(self, *args, **options):
self.stdout.write('Successfully processed (%d/%d): %s\n' % (i+1, numds, dsuri.uri))
ingested += 1
elif not cr and wds:
self.stdout.write('Successfully reprocessed (%d/%d): %s\n' % (i+1, numds, dsuri.uri))
reprocessed += 1
if options['force_reprocessing']:
self.stdout.write('Successfully reprocessed (%d/%d): %s\n' % (i+1, numds, dsuri.uri))
reprocessed += 1
else:
self.stdout.write('Already processed (%d/%d): %s\n' % (i+1, numds, dsuri.uri))
already_processed +=1
elif not cr and not wds:
failed += 1

self.stdout.write('Successfully processed %d/%d datasets.\n' % (ingested, numds))
self.stdout.write('%d/%d datasets were already processed.\n' % (already_processed, numds))
if options['force_reprocessing']:
self.stdout.write('Successfully reprocessed %d/%d datasets.\n' % (reprocessed, numds))
self.stdout.write('Failed at processing %d/%d datasets.\n' % (failed, numds))

0 comments on commit 398caab

Please sign in to comment.