#------------------------------------------------------------
# Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved
# $Id$
#------------------------------------------------------------
package RPS::Mechanical::CA::Job::CreateReservePipelineReport;

use strict;
use warnings;

use Sys::Hostname;

use lib '/app/tools/common/lib';
use Common::Log;
use Common::Assert;
use Common::RSApp;

use lib '/app/tools/rps/lib';
use RPS::DB::Item::CAMechanicalRun;
use RPS::Config;

use lib '/app/tools/job/lib';
use Job::Job;

use base 'Job::Job';

use constant kJobClass    => 'ReservePipelineReport';
use constant kLogBasePath => '/app/data/royalty_logs/';

sub _generateCommandLine {
    my ($self) = @_;

    my $runID = $self->getCommandLineArg('runID');
    assert($runID);

    my $clientID = $self->clientID();

    my $config     = RPS::Config->new();
    my $scriptPath = $config->get('report_script_dir');

    my $commandLine = "nice $scriptPath/ca_mechanical_reserve_pipeline.pl -c $clientID -r $runID";
    return $commandLine;
}

sub _defaultClass    { return 'RunUtility'; }
sub _defaultSubclass { return 'ReservePipelineReport'; }

###
1;    #
###
