!----------------------------------------------------------------------------
!
!      cdbreq RESOURCE FILE
!
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!
!----------------------------------------------------------------------------
!                          REVISION HISTORY
!--------------------------------------------------------------------
! DATE     PR      User      Description
! -------- ------  --------- -------------------------------------
! 07/01/99 39404   Heller    UNIX version of resource file
! 01/13/00 39307   Heller    Add POD class
! 03/16/00 40911   Heller    Fix qoarchives.cal_archdate update
! 02/12/02 40363   Rose      ACS cumulative MAMAs
! 02/13/02 44435   Rose      Add the COS and WFC3
! 03/14/02 45319   Sherbert  Introduce DIA_ARCH_DIR
! 01/14/03 47097   Goldst    Remove OMS/EDPS specific entries
! 03/19/03 47093   Slowinski modify ANC and PRB entries
! 03/17/04 50429   Goldst    Updated to support unix Ingest
! 04/09/04 50429   Goldst    Corrected CDBS_LOG_DIR
! 04/12/04 48141   MSwam     Remove unneeded CDBS_SERVER,OSF_FAILURE
! 05/03/04 48141   Sherbert  Change DSQUERY value to OPUS_SERVER
! 05/06/04 48141   MSwam     Clean FITS files as well
! 06/24/04 51412   Sherbert  For PR 50437 Remove DISPLAY_ORDER
! 07/08/04 51342   J.Baum    Remove INGEST_TABLE_FILTER
! 08/09/04 51342   MSwam     Put INGEST_TABLE_FILTER back (genreq requires)
! 08/16/07 58377   MSwam     Change filter to handle > 3char extensions (COS)
!----------------------------------------------------------------------------

PROCESS_NAME = genreq
TASK = <genreq -p $PATH_FILE -r cdbreq>
CLASS = cdb
DESCRIPTION = 'Initiate an archive request'
SYSTEM = CDBS

!----------------------------------------------------------------------------
! EVNT resource.
!----------------------------------------------------------------------------
POLLING_TIME = 5            ! Response time of the application
OSF_RANK = 1                ! OSF event ordering.
OSF_TRIGGER1.RQ = w         ! ARCREQ is triggered by AR = W

!----------------------------------------------------------------------------
! Application Specific resource
!----------------------------------------------------------------------------
POLLING_TIME = 1
OSF_PROCESSING.RQ = p       ! letter to be used when an OSF is processed.
OSF_ERROR.RQ = e            ! letter to be used when there is an error.

OSF_SUCCESS.RQ = c          ! Letters to be used when it is successful
OSF_SUCCESS.RS = v          ! Vaiting for Ingest Pipeline response

OSF_INGEST_DUPLICATE.RQ = d
OSF_DUPLICATE.RQ = d

OK_TO_UPDATE_DATABASE = T   ! Must be true. If false, ARCREQ will abort.
MAX_ERROR = 10              ! Maximun number unexpected errors before
                            ! ARCREQ quits

! PATH wide resources
MISSION = HST
LOG_DIR = cdbs_archive_log_dir
INGEST_PATH_NAME = INGEST_PATH_NAME
INGEST_STAGE_ID1 = INGEST_STAGE_ID1
INGEST_STAGE_ID2 = INGEST_STAGE_ID2
INGEST_STAGE_STATUS1 = h
INGEST_STAGE_STATUS2 = w
INGEST_PATH_ROOT = INGEST_PATH_ROOT
INGEST_TABLE_FILTER = none  ! not used for CDBS data, but reqd by genreq

DATA_DELETE_LOCATION.01 = cdbs_archive_log_dir
DATA_DELETE_FILTER.01   = <OSF_DATASET>_*.*

DATA_DELETE_LOCATION.02 = cdbs_archive_dir
DATA_DELETE_FILTER.02   = <OSF_DATASET>_*.*

!----------------------------------------------------------------------------
! For each data_id, the following resources must be present except where noted:
!
!    .DATASET_DIR    = The data set directory.
!    .DATASET_FILTER = <DATASET_NAME>.* The filter to be used to find
!                      all the dataset. <DATASET_NAME> will be replaced
!                      by the actual OSF dataset name at run time.
!    .PROCESS_TYPE   = (GENERIC,NIC_ASN,STIS_ASN,FGS_ASN,FUSE_ASN,HST_CAL)
!    .RENAME_FILES   = (Y/N) (optional)
!    .REMOVE_DANGLE  = (Y/N) (optional)
!    .CONVERT_ASCII  = (Y/N) (optional)
!    .TRACK_EXT      = (Y/N) When it is Y, every extension is saved in 
!                      archive_files relation (optional).
!    .QOARCHIVES_FLAG = (Y/N) (optional)
!----------------------------------------------------------------------------

CDB.DATASET_DIR = cdbs_archive_dir
CDB.DATASET_FILTER = <DATASET_NAME>*_*.fits
CDB.PROCESS_TYPE = GENERIC
CDB.TRACK_EXT = Y

CTB.DATASET_DIR = cdbs_archive_dir
CTB.DATASET_FILTER = <DATASET_NAME>*_*.fits
CTB.PROCESS_TYPE = GENERIC
CTB.TRACK_EXT = Y

ENV.OPUS_DB = OPUS_DB
ENV.DSQUERY = OPUS_SERVER
