=over 4
-=item jobnum - primary key
+=item jobnum
-=item job - fully-qualified subroutine name
+Primary key
-=item status - job status
+=item job
-=item statustext - freeform text status message
+Fully-qualified subroutine name
-=item _date - UNIX timestamp
+=item status
-=item svcnum - optional link to service (see L<FS::cust_svc>)
+Job status (new, locked, or failed)
+
+=item statustext
+
+Freeform text status message
+
+=item _date
+
+UNIX timestamp
+
+=item svcnum
+
+Optional link to service (see L<FS::cust_svc>).
+
+=item custnum
+
+Optional link to customer (see L<FS::cust_main>).
+
+=item secure
+
+Secure flag, 'Y' indicates that when using encryption, the job needs to be
+run on a machine with the private key.
+
+=cut
=back
#false laziness w/part_export.pm
sub insert {
- my $self = shift;
+ my( $self, @args ) = @_;
local $SIG{HUP} = 'IGNORE';
local $SIG{INT} = 'IGNORE';
local $FS::UID::AutoCommit = 0;
my $dbh = dbh;
+ my %args = @args;
+ $self->custnum( $args{'custnum'} ) if $args{'custnum'};
+
my $error = $self->SUPER::insert;
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return $error;
}
- foreach my $arg ( @_ ) {
+ foreach my $arg ( @args ) {
my $queue_arg = new FS::queue_arg ( {
'jobnum' => $self->jobnum,
'arg' => $arg,