nsmcp::LogService method poll (public)
<instance of nsmcp::LogService> poll context handle
Defined in /usr/local/ns/tcl/nsmcp/lib/log-tools.tcl
- Parameters:
- context (required)
- handle (required)
- Testcases:
- No testcase defined.
Source code: :require $context ns_mutex lock ${:mutex} try { if {![nsv_exists ${:store} $handle] || ![:owned $context [nsv_get ${:store} $handle]]} { foreach key [nsv_array names ${:store}] { set record [nsv_get ${:store} $key] if {![:owned $context $record]} continue if {[dict exists $record mappings $handle]} {return -code error -errorcode {NSMCP RPC -32602} "This is a resultHandle; pass it as resultHandle to read a page"} if {[dict exists $record windowHandle] && [dict get $record windowHandle] eq $handle} {return -code error -errorcode {NSMCP RPC -32602} "This is a windowHandle; use it with access_summary"} } return -code error -errorcode {NSMCP RPC -32602} "Unknown or expired job handle" } set record [nsv_get ${:store} $handle] if {[dict exists $record requiresPeers] && [dict get $record requiresPeers]} {${:authorizer} require $context diagnostics.logs.peers.read} set data [list jobHandle string $handle status string [dict get $record status] server string [ns_info server]] if {[dict exists $record windowHandle]} {lappend data windowHandle string [dict get $record windowHandle]} if {[dict get $record status] eq "complete"} {lappend data result object [dict get $record data]} if {[dict get $record status] eq "failed"} {lappend data error string {Log search failed; consult the server log.}} return [list {} object $data] } finally {ns_mutex unlock ${:mutex}}XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)