Sha256: 0e29e728128402278bd9fe6e69367ef32a8667492d15f956465b694f43ff0313

Contents?: true

Size: 908 Bytes

Versions: 25

Compression:

Stored size: 908 Bytes

Contents

<h1>Database connections</h1>

<table>
  <thead>
    <tr>
      <th>Key</th>
      <th>Free</th>
    </tr>
  </thead>
  <tbody>
    <%
      thread_handler = _hb.db_handler.conns
      if !thread_handler.is_a?(Knj::Threadhandler)
        print "A threadhandler has not been spawned for this instance."
        exit
      end
      
      objects = thread_handler.objects.clone
      
      objects.each_index do |key|
        val = objects[key]
        
        %>
          <tr>
            <td>
              <%=key%>
            </td>
            <td>
              <%=Knj::Strings.yn_str(val[:free])%>
            </td>
          </tr>
        <%
      end
      
      if objects.empty?
        %>
          <tr>
            <td colspan="2">
              Thread handler was spawned but no active connections was spawned?
            </td>
          </tr>
        <%
      end
    %>
  </tbody>
</table>

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
hayabusa-0.0.5 pages/debug_database_connections.rhtml
hayabusa-0.0.4 pages/debug_database_connections.rhtml
hayabusa-0.0.3 pages/debug_database_connections.rhtml
hayabusa-0.0.2 pages/debug_database_connections.rhtml
hayabusa-0.0.1 pages/debug_database_connections.rhtml