procedure(CDS_P4StartAutoSync() ;_Jun 26 01 sikand 1044
; start the autosyncer processes
let(( client cmd liblist)
;; 5 minute default auto sync interval
CDS_P4DefaultAutoSyncInterval = 300;
unless( boundp('CDS_P4RunAutoSync)
CDS_P4RunAutoSync = t
)
if( CDS_P4RunAutoSync then
liblist = ddGetLibList()
foreach( lib liblist
when( ddGetObjDMSys(lib) == "p4"
client = CDS_P4GetClient(lib)
cmd = sprintf(nil "cdsautosync %s %d" client CDS_P4DefaultAutoSyncInterval)
;; make sure we don't duplicate
when( id = CDS_IPCTable[cmd]
if( ipcIsAliveProcess(id) then
;; kill it
printf("Killing old autosync process for lib %s\n" lib~>name)
ipcKillProcess(id)
)
) ; ** when id **
printf("Starting autosyncer for lib %s, interval %d\n"
lib~>name CDS_P4DefaultAutoSyncInterval)
CDS_IPCNoWaitCommand(cmd)
t
) ; ** when ddGetObjDMSys **
) ; ** foreach lib **
else
printf("Autosync is disabled\n")
) ; ** if CDS_P4RunAutoSync **
t
) ; ** let **
) ; ** procedure CDS_P4StartAutoSync **
procedure(CDS_P4StopAutoSync() ;_Jun 26 01 sikand 262
let(()
foreach( elem CDS_IPCTable~>??
when( stringp(elem)
when( rexMatchp("cdsautosync" elem)
ipcKillProcess(CDS_IPCTable[elem])
)
)
) ; ** foreach elem **
t
) ; ** let **
) ; ** procedure CDS_P4StopAutoSync **