infodev:log-progress( $ticket-id as xs:string, $annotation as element(info:annotation), [$documents-processed as xs:nonNegativeInteger?], [$transactions-completed as xs:nonNegativeInteger?], [$error-log-level as xs:string?] ) as empty-sequence()
[DEPRECATED] This function writes log information into a ticket's progress file that is written to the App-Services database.
xquery version "1.0-ml"; import module namespace info = "http://marklogic.com/appservices/infostudio" at "/MarkLogic/appservices/infostudio/info.xqy"; import module namespace infodev = "http://marklogic.com/appservices/infostudio/dev" at "/MarkLogic/appservices/infostudio/infodev.xqy"; let $annotation := <info:annotation>Load took longer than 10 minutes</info:annotation> for $ticket in info:tickets() let $time := fn:data(info:ticket($ticket)//info:time-consumed) return if (fn:minutes-from-duration(xs:duration($time)) gt 10) then infodev:log-progress($ticket, $annotation) else () (: Change progress annotation on any ticket with a time-consumed value over 10 minutes. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.