#------------------------------------------------------------
# Copyright (C) 2008 RoyaltyShare, Inc.   All Rights Reserved
#------------------------------------------------------------
package RPS::Portal::Job::SendInvite;

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::Config;

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

use base 'Job::Job';

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

    my $clientID      = $self->clientID();
    my $payeeRecipientList = $self->getCommandLineArg('payeeRecipientList');

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

    my $commandLine = "nice $scriptPath/send_invite.pl -c $clientID -p $payeeRecipientList";

    return $commandLine;
}

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

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

sub _defaultClass    { return 'Portal'; }
sub _defaultSubclass { return 'SendInvite'; }

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

###
1;    #
###

