The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

PkgForge::Queue - Represents a build queue for the LCFG Package Forge

VERSION

This documentation refers to PkgForge::Queue version 1.1.10

SYNOPSIS

    use PkgForge::Queue;
    use PkgForge::Job;

    my $queue = PkgForge::Queue->new( directory => "/tmp/incoming" );

    for my $entry ($queue->entries) {
        my $job = PkgForge::Job->new_from_qentry($qentry);

        $job->validate();
    }

DESCRIPTION

In the LCFG Package Forge a build queue is represented by a directory. The jobs in a queue are each represented by separate sub-directories within that build queue directory.

This module is used as a lightweight representation of a queue. It is basically a means of finding all the build queue entry sub-directories.

ATTRIBUTES

These attributes are all only settable when the Queue object is created. After that point they are all read-only.

directory

The directory in which the queue is stored.

This is a boolean value which controls whether or not queue items in the directory can be symbolic links. By default this option is false.

cruft

A list of anything found in the queue directory which is not a valid queue item. This is anything which is not a directory and, depending on the setting of the allow_symlinks attribute, might also contain symbolic links to directories.

entries

This is a list of PkgForge::Queue::Entry items representing the sub-directories found in the queue directory.

SUBROUTINES/METHODS

new

This creates a new Queue object. The directory attribute must be specified.

rescan

This forces the queue object to rescan the directory and resets the cruft and entry lists.

sorted_entries

Returns the list of entries sorted by the timestamp.

clear_entries

Empties the list of entries

add_entries

Adds Queue::Entry objects to the entries list.

count_entries

Returns the size of the list of entries.

clear_cruft

Empties the list of cruft

add_cruft

Adds items to the list of cruft.

count_cruft

Returns the size of the list of cruft.

DEPENDENCIES

This module is powered by Moose and uses MooseX::Types

SEE ALSO

PkgForge, PkgForge::Queue::Entry, PkgForge::Utils

PLATFORMS

This is the list of platforms on which we have tested this software. We expect this software to work on any Unix-like platform which is supported by Perl.

ScientificLinux5, Fedora13

BUGS AND LIMITATIONS

Please report any bugs or problems (or praise!) to bugs@lcfg.org, feedback and patches are also always very welcome.

AUTHOR

    Stephen Quinney <squinney@inf.ed.ac.uk>

LICENSE AND COPYRIGHT

    Copyright (C) 201O University of Edinburgh. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the terms of the GPL, version 2 or later.