rest-ftp-daemon 0.221.2 → 0.222.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,31 +0,0 @@
1
- module RestFtpDaemon
2
- module API
3
- class Root < Grape::API
4
-
5
- ####### GET /debug
6
-
7
- get '/raise' do
8
- log_info "GET /debug"
9
- begin
10
- raise RestFtpDaemon::DummyException
11
- rescue RestFtpDaemon::RestFtpDaemonException => exception
12
- status 501
13
- api_error exception
14
- rescue Exception => exception
15
- status 501
16
- api_error exception
17
- else
18
- status 200
19
- {}
20
- end
21
- end
22
-
23
- get '/routes' do
24
- info "GET /routes"
25
- status 200
26
- return RestFtpDaemon::API::Root::routes
27
- end
28
-
29
- end
30
- end
31
- end
@@ -1,33 +0,0 @@
1
- module RestFtpDaemon
2
- module API
3
- class Root < Grape::API
4
-
5
-
6
- ####### GET /status
7
-
8
- # Server global status
9
- get '/status' do
10
- log_info "GET /status"
11
- mem = GetProcessMem.new
12
-
13
- status 200
14
- return {
15
- hostname: `hostname`.chomp,
16
- version: APP_VER,
17
- started: APP_STARTED,
18
- uptime: (Time.now - APP_STARTED).round(1),
19
- counters: $queue.counters,
20
- memory_bytes: mem.bytes.to_i,
21
- memory_mb: mem.mb.round(0),
22
- status: $queue.counts_by_status,
23
- workers: $pool.worker_variables,
24
- jobs_count: $queue.jobs_count,
25
- jobs_queued: $queue.queued_ids,
26
- config: Helpers.get_censored_config,
27
- #routes: RestFtpDaemon::API::Root::routes,
28
- }
29
- end
30
-
31
- end
32
- end
33
- end