!-------------------------------------------------------------------- 
! 
!      cdbnewref RESOURCE FILE
!
!      This file is used to construct the trigger, error, and success status
!      fields in the observation status file.
!
!--------------------------------------------------------------------
!                          REVISION HISTORY
!--------------------------------------------------------------------
!            PR
!   DATE   NUMBER  User   Description
! -------- ------  ------ -------------------------------------
! 04/11/03 48141   MSwam     first version
! 10/20/04 51433   MSwam     fix time triggering
! 11/08/07 56836   Sherbert  Add COS, WF3 to supported SIs list
! 05/10/10 49175   MSwam     Change from TIME poller to OSF poller
! 08/18/11 69133   MSwam     Adjust "chunk" from 5000 to 1000 at DBA suggestion
!
!--------------------------------------------------------------------
PROCESS_NAME = cdbnewref		! Short name for process id
TASK = <xpoll -p $PATH_FILE -r cdbnewref>
COMMAND = 'cdb_new_reffiles.csh ^CL'
DESCRIPTION = 'BESTREF new ref files for old exposures'
SYSTEM = CDBS
CLASS = cdb

OSF_RANK = 1			! First Trigger
OSF_TRIGGER1.BR = w
OSF_TRIGGER1.DATA_ID = ref

OSF_PROCESSING.BR  = p		! Set flag while 'Processing'

XPOLL_STATE.00 = OSF_NORMAL
OSF_NORMAL.BR      = c		! 
OSF_NORMAL.DE      = w		! Wait for next stage

XPOLL_STATE.01 = OSF_ERROR
OSF_ERROR.BR       = e		! Ref files not on disk or other fatal error 

XPOLL_ERROR.BR = x              ! Set osf to this if exit state is undefined.

POLLING_TIME           = 30	! Wait (seconds) before polling for next 
MINBLOCKS              = 20000    !space for SQL files and logs
ENV.OUTPATH            = bestref_log_dir
ENV.UPDATE_LIMIT       = 1000     !number of rows per update "chunk"
ENV.STIS_MAIL_LIST     = stis_bestref_email_list
ENV.OPERATOR_MAIL_LIST = operator_newref_email_list
!
! This list of instruments can't be put in the path file because
! of the way it is parsed and used in the cdb_new_reffiles.sh script
! (the parsing requires a quoted white-space delimited list, and
!  pulling it through the path file apparently gets rid of the quotes)
ENV.SUPPORTED_INSTR    = 'acs wfpc2 stis nic synphot cos wfc3'
!
ENV.CDBS_SERVER    = CDBS_SERVER
ENV.CDBS_DB        = CDBS_DB
ENV.REFFILE_SERVER = REFFILE_SERVER
ENV.REFFILE_DB     = REFFILE_DB
ENV.ARCH_SERVER    = ARCH_SERVER
ENV.ARCH_DB        = ARCH_DB    
