<%doc> =head1 NAME update_chunk_status.html =head1 SYNOPSIS Use: update_chunk_status.html?instance="database_name"&nn="night_number"&chunk="chunk1"&...&chunk="chunkN" =head1 Description This mason component will set the status of any fields with a status of $FIELD_STATUS_INGESTED to $FIELD_STATUS_READY in the chunks specified. =head1 ARGUMENTS =over 4 =item instance Name of the database containing the MOPS data. =item nn The night number from which the chunks will be retrieved. =item chunk Name of the chunk whose status is to be updated. =back =head1 AUTHOR Denver Green, Edgreen@ifa.hawaii.eduE. =head1 COPYRIGHT Copyright 2012 by Institute for Astronomy, University of Hawaii. =head1 DATE 17-Feb-2012 =cut <%args> $chunks => undef $nn => undef $instance => undef <%init> use PS::MOPS::Admin qw(:all); my $result; my @args; if (ref($chunks)) { @args = @{$chunks}; } else { @args = $chunks; } # Change chunk status to indicate that they are ready for processing. $result = PS::MOPS::Admin::change_chunk_status($instance, $nn, @args); # Refresh exposures table. $m->comp("exposures.html", instance => $instance, nn => $nn); # Debugging code below. #$r->content_type('text/plain'); #$m->clear_buffer; #$m->print("chunks: ", $chunks, "\n", "nn: ", $nn, "\n", "instance: ", $instance, "\n", "results: ", $result, "\n"); #$m->abort;