Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion python/lsst/ap/association/diaPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,16 @@ class DiaPipelineConfig(pipeBase.PipelineTaskConfig,
doc="Pad the image by this many pixels before removing off-image "
"diaObjects for association.",
)
maximumTableLength = pexConfig.RangeField(
dtype=int,
default=500,
min=0,
max=65535,
doc="Maximum length of tables allowed to be written in one operation"
" to the APDB. Set to 0 to disable."
"The maximum is the hard limit on the number of records in the"
" Cassandra APDB that can be updated in one transaction",
)
idGenerator = DetectorVisitIdGeneratorConfig.make_field()

def setDefaults(self):
Expand Down Expand Up @@ -786,7 +796,8 @@ def writeToApdb(self, updatedDiaObjects, associatedDiaSources, diaForcedSources)
DateTime.now().toAstropy(),
diaObjectStore,
diaSourceStore,
diaForcedSourceStore)
diaForcedSourceStore,
maximum_table_length=self.config.maximumTableLength)
self.log.info("APDB updated.")

def testDataFrameIndex(self, df):
Expand Down