!--------------------------------------------------------------------
!
!  update RESOURCE FILE
!
!       This file is used to define various values for the Update
!       Support Schedule Tables process.
!
!--------------------------------------------------------------------
!                          REVISION HISTORY
!--------------------------------------------------------------------
!            PR
!   DATE   NUMBER User       Description
! -------- ------ ---------- --------------------------------
! 10/09/03 49550  Goldst     Created initial version
! 04/13/04 50933  J.Baum     Add source override parameters
! 05/27/04 50933  J.Baum     Add MISSIONS and PROPRIETARY keywords
! 06/24/04 51412  Sherbert   For PR 50437 Remove DISPLAY_ORDER
! 11/04/09 61672  Sherbert   Move list of 9th chars here
! 09/20/10 65997  Sherbert   new CSI/SSI must be proprietary
! 09/18/12 72255  Sherbert   get rid of DSQUERY
!--------------------------------------------------------------------

PROCESS_NAME = update
TASK         = <xpoll -p $PATH_FILE -r update>
DESCRIPTION  = 'Update archive tables and signal install is complete'
COMMAND      = ingest_update_archive.pl
SYSTEM       = INGEST
CLASS        = all

OSF_RANK             = 1     ! Only OSF triggers for this task

OSF_TRIGGER1.UP      = w     ! Wait flag for normal processing
OSF_TRIGGER2.UP      = a     ! Alarm flag for alarm  processing
OSF_TRIGGER3.UP	     = b     ! Bad flag for bad dataset processing

OSF_PROCESSING.UP    = p     ! Processing flag - required 
OSF_SUCCESS.UP       = c     ! Completed update processing
OSF_SUCCESS.IQ       = n     ! No query made
OSF_SUCCESS.LG       = w     ! Set wait flag for savlog task
OSF_DONE.UP          = d     ! Done with alarm processing
OSF_VAIT.UP          = v     ! Incomplete group request, no signal
OSF_FAIL.UP          = e     ! Error: Set the trouble flag
XPOLL_ERROR.UP       = x     ! Undefined exit status

XPOLL_STATE.07 = OSF_FAIL    ! exit status 7 == OSF_FAIL state
XPOLL_STATE.09 = OSF_SUCCESS ! exit status 9 == OSF_SUCCESS state
XPOLL_STATE.11 = OSF_DONE    ! exit status 11 == OSF_DONE state
XPOLL_STATE.13 = OSF_VAIT    ! exit status 13 == OSF_VAIT state 

POLLING_TIME = 10            ! Amount of time to wait before polling for next

! Also see the ingest_up_control relation in the opus database for variables
! defined for each data_id related to the remote pipelines that provided files
! to be ingested.

! The following variables prefixed by "ENV." are passed to the 
! ingest_update_archive script as environmental variables. 

! All the data_id values that are used for OSFs that make NSA install requests
! in this pipeline must be provided in a set of enumerated variables having a
! two digit numeric suffix.
 
ENV.INSTALL_ID.01 = HST      ! HST datasets except the CAL class
ENV.INSTALL_ID.02 = HSI      ! CAL class datasets for HST Science Instruments

! For each remote_pipeline value in the ingest_up_control table an entry must
! appear below. The variable must have the same name as the database value.
! An entry in the Ingest path file must be provided to translate this name into
! the actual remote path file name used for the remote pipelines that provide
! data to this Ingest pipeline.

ENV.REMOTE_OPUS_PATH = REMOTE_OPUS_PATH  ! assigned in path file
ENV.REMOTE_FGS_PATH  = REMOTE_FGS_PATH   ! assigned in path file
ENV.REMOTE_CDBS_PATH = REMOTE_CDBS_PATH  ! assigned in path file
ENV.REMOTE_PDR_PATH  = REMOTE_PDR_PATH   ! assigned in path file
ENV.REMOTE_AST_PATH  = REMOTE_AST_PATH   ! assigned in path file

! list the missions supported by this task - multiple missions can be
! used if no data_id values are shared, otherwise new task is needed
ENV.MISSIONS = HST

! list the archive classes to have a release delay
ENV.PROPRIETARY = CAL,EDT,AST,ASN,PRB,CSI,SSI
! TYPE_VERSIONS is the last character of HST CAL exposure datasets - 
! when dataset names differ only by this last character, then the best 
! version is the dataset with the leftmost character in this sequence.
ENV.TYPE_VERSIONS = SQNPMTOR

! for each mission supported in the pipeline - provide release delay
ENV.HST_RELEASE_DELAY_MO = 12   ! HST release delay months

! these varibles are always required for every mission
ENV.INGEST_LOG_DIR     = DATASET_LOG_DIR    ! assigned in path file
ENV.PROBLEM_LOG_DIR    = PROBLEM_DIR        ! assigned in path file
ENV.UPDATE_STAGE       = UP       ! the stage used for the UPDATE triggers
ENV.UPDATE_ALARM       = a        ! status used to signal alarm state to UPDATE
ENV.UPDATE_READY       = w        ! status used to retrigger UPDATE
ENV.INGEST_SOURCE_DIR  = INGEST_SOURCE_DIR ! for data source override file
ENV.OVERRIDE_FILE_MASK = source_override.* ! wildcard matches override value
ENV.OVERRIDE_REQUIRED  = OVERRIDE_REQUIRED  ! Y or N (set in path file)
ENV.OPERATOR_MAIL_LIST = operator_email_list

! forces values from path to be used - overriding login values (is this true? I think not)
ENV.OK_TO_UPDATE_DATABASE = OK_TO_UPDATE_DATABASE
ENV.OPUS_SERVER = OPUS_SERVER 
ENV.SPSS_DB     = SPSS_DB 
ENV.SPSS_SERVER = SPSS_SERVER
ENV.OPUS_DB     = OPUS_DB 
ENV.ARCH_DB     = ARCH_DB
ENV.ARCH_SERVER = ARCH_SERVER 
ENV.ASSIST_SERVER = ASSIST_SERVER
ENV.ASSIST_DB = ASSIST_DB
ENV.PROP_SERVER = PROP_SERVER
ENV.PROP_DB = PROP_DB
