expose batch size as a cli argument in the load_survey command
This commit is contained in:
parent
dafea2d4ad
commit
2cd67bd295
@ -15,7 +15,7 @@ from datetime import datetime
|
|||||||
# DEFINE BATCH SIZE AND BATCH
|
# DEFINE BATCH SIZE AND BATCH
|
||||||
# **************************************************************
|
# **************************************************************
|
||||||
|
|
||||||
BATCH_SIZE = 1000000
|
#BATCH_SIZE = 1000000
|
||||||
|
|
||||||
def batch(iterable, size):
|
def batch(iterable, size):
|
||||||
"""
|
"""
|
||||||
@ -56,7 +56,12 @@ class Command(BaseCommand):
|
|||||||
required=True,
|
required=True,
|
||||||
help='Integer ID of the survey being read'
|
help='Integer ID of the survey being read'
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--batch_size',
|
||||||
|
type=int,
|
||||||
|
required=True,
|
||||||
|
help='Integer number of pixels to be inserted into the database at once'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
@ -67,6 +72,7 @@ class Command(BaseCommand):
|
|||||||
counts_file = options['counts']
|
counts_file = options['counts']
|
||||||
exposure_file = options['exposure']
|
exposure_file = options['exposure']
|
||||||
survey_number = options['survey_number']
|
survey_number = options['survey_number']
|
||||||
|
BATCH_SIZE = options['batch_size']
|
||||||
|
|
||||||
self.stdout.write(f"\nCounts file:\t{counts_file}")
|
self.stdout.write(f"\nCounts file:\t{counts_file}")
|
||||||
self.stdout.write(f"Exposure file:\t{exposure_file}")
|
self.stdout.write(f"Exposure file:\t{exposure_file}")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user