Sha256: e21f40ae09f582b9cdf6c9490d01d02130d6da167638fa001900e97b14f3b907

Contents?: true

Size: 810 Bytes

Versions: 3

Compression:

Stored size: 810 Bytes

Contents

module RestFtpDaemon
  module API
    class Root < Grape::API


####### GET /status

      # Server global status
      get '/status' do
        info "GET /status"
        mem = GetProcessMem.new

        status 200
        return  {
          hostname: `hostname`.chomp,
          version: APP_VER,
          started: APP_STARTED,
          uptime: (Time.now - APP_STARTED).round(1),
          counters: $queue.counters,
          memory_bytes: mem.bytes.to_i,
          memory_mb: mem.mb.round(0),
          status: $queue.counts_by_status,
          workers: $pool.worker_variables,
          jobs_count: $queue.jobs_count,
          jobs_queued: $queue.queued_ids,
          config: Helpers.get_censored_config,
          #routes: RestFtpDaemon::API::Root::routes,
          }
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.214.0 lib/rest-ftp-daemon/api/status.rb
rest-ftp-daemon-0.213.0 lib/rest-ftp-daemon/api/status.rb
rest-ftp-daemon-0.212.0 lib/rest-ftp-daemon/api/status.rb