l.s.b.q.QueueItemsView(LaunchpadView) : class documentation

Part of lp.soyuz.browser.queue View In Hierarchy

Known subclasses: lp.soyuz.browser.distroseries.DistroSeriesQueueView

Base class used to present objects that contain queue items.

It retrieves the UI queue_state selector action and sets up a proper batched list with the requested results. See further UI details in template/distroseries-queue.pt and callsite details in DistroSeries view classes.

Method setupQueueList Setup a batched queue list.
Method builds_dict Return a dictionary of PackageUploadBuild keyed on build ID.
Method binary_files_dict Build a dictionary of lists of binary files keyed by upload ID.
Method source_files_dict Return a dictionary of source files keyed on PackageUpload ID.
Method calculateOldBinaries Calculate uploaded binary files in this batch that are old.
Method getPackagesetsFor Find associated Packagesets.
Method loadPackageCopyJobs Batch-load `PackageCopyJob`s and related information.
Method decoratedQueueBatch Return the current batch, converted to decorated objects.
Method is_new Return True if the binarypackagerelease has no ancestry.
Method availableActions Return the available actions according to the selected queue state.
Method performQueueAction Execute the designed action over the selected queue items.
Method sortedSections Possible sections for the context distroseries.
Method priorities An iterable of priorities from PackagePublishingPriority.
def setupQueueList(self):
Setup a batched queue list.

Returns None, so use tal:condition="not: view/setupQueueList" to invoke it in template.

def builds_dict(self, upload_ids, binary_files):
Return a dictionary of PackageUploadBuild keyed on build ID.
Parametersupload_idsA list of PackageUpload IDs.
binary_filesA list of BinaryPackageReleaseFiles.
def binary_files_dict(self, package_upload_builds_dict, binary_files):
Build a dictionary of lists of binary files keyed by upload ID.

To do this efficiently we need to get all the PackageUploadBuild records at once, otherwise the IBuild.package_upload property causes one query per iteration of the loop.

def source_files_dict(self, package_upload_source_dict, source_files):
Return a dictionary of source files keyed on PackageUpload ID.
def calculateOldBinaries(self, binary_package_names):
Calculate uploaded binary files in this batch that are old.
def getPackagesetsFor(self, source_package_releases):
Find associated `Packagesets`.

:param source_package_releases: A sequence of `SourcePackageRelease`s.
def loadPackageCopyJobs(self, uploads):
Batch-load `PackageCopyJob`s and related information.
def decoratedQueueBatch(self):
Return the current batch, converted to decorated objects.

Each batch item, a PackageUpload, is converted to a CompletePackageUpload. This avoids many additional SQL queries in the +queue template.

def is_new(self, binarypackagerelease):
Return True if the binarypackagerelease has no ancestry.
def availableActions(self):
Return the available actions according to the selected queue state.

Returns a list of labelled actions or an empty list.

def performQueueAction(self):
Execute the designed action over the selected queue items.

Returns a message describing the action executed or None if nothing was done.

def sortedSections(self):
Possible sections for the context distroseries.

Return an iterable of possible sections for the context distroseries sorted by their name.

def priorities(self):
An iterable of priorities from PackagePublishingPriority.
API Documentation for Launchpad, generated by pydoctor at 2019-11-20 00:00:15.