Sha256: 81ad053c1b68d7824140fd255f0565a104c0a6c5b8b669b440c3d9e5cae396a4

Contents?: true

Size: 751 Bytes

Versions: 5

Compression:

Stored size: 751 Bytes

Contents

module RestFtpDaemon
  module API
    class Root < Grape::API


####### GET /status

      # Server global status
      get '/status' do
        info "GET /status"
        status 200
        return  {
          hostname: `hostname`.chomp,
          version: APP_VER,
          config: Helpers.get_censored_config,
          started: APP_STARTED,
          uptime: (Time.now - APP_STARTED).round(1),
          counters: $queue.counters,
          status: $queue.counts_by_status,
          vars: $pool.worker_vars,
          jobs_count: $queue.all_size,
          jobs_queued: $queue.queued.collect(&:id),
          jobs_popped: $queue.popped.collect(&:id),
          #routes: RestFtpDaemon::API::Root::routes,
          }
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.202.2 lib/rest-ftp-daemon/api/status.rb
rest-ftp-daemon-0.202.1 lib/rest-ftp-daemon/api/status.rb
rest-ftp-daemon-0.202 lib/rest-ftp-daemon/api/status.rb
rest-ftp-daemon-0.200 lib/rest-ftp-daemon/api/status.rb
rest-ftp-daemon-0.104.5 lib/rest-ftp-daemon/api/status.rb