Stephen Quinney > PkgForge-Server-1.1.10 > PkgForge::Queue::Entry

Download:
PkgForge-Server-1.1.10.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: v1.1.10   Source  

NAME ^

PkgForge::Queue::Entry - Represents an entry in a build queue for the LCFG Package Forge

VERSION ^

This documentation refers to PkgForge::Queue::Entry version 1.1.10

SYNOPSIS ^

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

     my $qentry = PkgForge::Queue::Entry->new($dir);

     print "Queue entry: " . $qentry->id .
           " submitted at: " . $qentry->pretty_timestamp . "\n";

     my $job = PkgForge::Job->new_from_qentry($qentry);

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 an entry within a queue. It is basically a means of querying useful meta-data associated with a physical directory.

ATTRIBUTES ^

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

path

This is the path to a directory which represents an entry in a build queue. It must exist.

id

This is the identifier for the build queue entry, it is the name of the specific sub-directory within the queue directory, (i.e. the final, deepest level of the directory tree only).

owner

This is the UID of the owner of the queue entry directory.

timestamp

This is the ctime of the queue entry directory.

SUBROUTINES/METHODS ^

new($path)

Takes the path to the individual directory which represents a job in the build queue and returns a Queue::Entry object.

overdue($timeout)

This takes a timeout, in seconds, and returns a boolean value which signifies whether or not the build queue entry is more than that many seconds old.

scrub

This method will erase the directory associated with this build queue entry. Note that it also blows away the object since it no longer has any physical meaning once the directory is gone. Internally this uses the remove_tree subroutine provided by PkgForge::Utils. It is possible, optionally, to pass in a reference to a hash of options to control how the remove_tree subroutine functions.

pretty_timestamp

This method returns a nicely formatted string form of the timestamp attribute. This uses the localtime function and is provided mainly for prettier logging.

DEPENDENCIES ^

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

SEE ALSO ^

PkgForge, PkgForge::Queue, 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.

syntax highlighting: