#------------------------------------------------------------
# Copyright (C) 2008 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package Raptor::Tracker::Job::DumpAllExceptions;

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/raptor/lib';
use Raptor::Config;

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

use base 'Job::Job';

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

    # Let's go ahead and construct everything now.
    #
    my $clientID = $self->clientID();

    my $fileName = $self->getCommandLineArg('fileName');

    my $config     = Raptor::Config->new();
    my $scriptPath = $config->get('dump_exceptions_script_dir');

    my $commandLine = "nice $scriptPath/dump_all_exceptions.pl -c $clientID -f $fileName";
    return $commandLine;
}

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

    my $config = Raptor::Config->new();
    return $config->get('dump_exceptions_log_dir');
}

sub _defaultClass    { return 'Tracker'; }
sub _defaultSubclass { return 'DumpAllExceptions'; }

#sub _defaultHostname    { return hostname(); }
sub _defaultPriority { return Job::Job::kPriorityHigh; }

###
1;    #
###

