@@ -23,12 +23,10 @@ defmodule Appwrite.Services.Health do
2323 """
2424 @ spec get ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
2525 def get do
26- try do
27- Client . call ( "GET" , "/v1/health" , % { } , % { } )
28- |> handle_response ( )
29- rescue
30- error -> { :error , error }
31- end
26+ Client . call ( "GET" , "/v1/health" , % { } , % { } )
27+ |> handle_response ( )
28+ rescue
29+ error -> { :error , error }
3230 end
3331
3432 @ doc """
@@ -42,12 +40,10 @@ defmodule Appwrite.Services.Health do
4240 """
4341 @ spec get_antivirus ( ) :: { :ok , HealthAntivirus . t ( ) } | { :error , AppwriteException . t ( ) }
4442 def get_antivirus do
45- try do
46- Client . call ( "GET" , "/v1/health/anti-virus" , % { } , % { } )
47- |> handle_response ( )
48- rescue
49- error -> { :error , error }
50- end
43+ Client . call ( "GET" , "/v1/health/anti-virus" , % { } , % { } )
44+ |> handle_response ( )
45+ rescue
46+ error -> { :error , error }
5147 end
5248
5349 @ doc """
@@ -59,12 +55,10 @@ defmodule Appwrite.Services.Health do
5955 """
6056 @ spec get_cache ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
6157 def get_cache do
62- try do
63- Client . call ( "GET" , "/v1/health/cache" , % { } , % { } )
64- |> handle_response ( )
65- rescue
66- error -> { :error , error }
67- end
58+ Client . call ( "GET" , "/v1/health/cache" , % { } , % { } )
59+ |> handle_response ( )
60+ rescue
61+ error -> { :error , error }
6862 end
6963
7064 @ doc """
@@ -82,12 +76,10 @@ defmodule Appwrite.Services.Health do
8276 def get_certificate ( domain \\ nil ) do
8377 params = maybe_put ( % { } , "domain" , domain )
8478
85- try do
86- Client . call ( "GET" , "/v1/health/certificate" , % { } , params )
87- |> handle_response ( )
88- rescue
89- error -> { :error , error }
90- end
79+ Client . call ( "GET" , "/v1/health/certificate" , % { } , params )
80+ |> handle_response ( )
81+ rescue
82+ error -> { :error , error }
9183 end
9284
9385 @ doc """
@@ -99,12 +91,10 @@ defmodule Appwrite.Services.Health do
9991 """
10092 @ spec get_db ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
10193 def get_db do
102- try do
103- Client . call ( "GET" , "/v1/health/db" , % { } , % { } )
104- |> handle_response ( )
105- rescue
106- error -> { :error , error }
107- end
94+ Client . call ( "GET" , "/v1/health/db" , % { } , % { } )
95+ |> handle_response ( )
96+ rescue
97+ error -> { :error , error }
10898 end
10999
110100 @ doc """
@@ -116,12 +106,10 @@ defmodule Appwrite.Services.Health do
116106 """
117107 @ spec get_pub_sub ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
118108 def get_pub_sub do
119- try do
120- Client . call ( "GET" , "/v1/health/pubsub" , % { } , % { } )
121- |> handle_response ( )
122- rescue
123- error -> { :error , error }
124- end
109+ Client . call ( "GET" , "/v1/health/pubsub" , % { } , % { } )
110+ |> handle_response ( )
111+ rescue
112+ error -> { :error , error }
125113 end
126114
127115 @ doc """
@@ -140,12 +128,10 @@ defmodule Appwrite.Services.Health do
140128 def get_queue_builds ( threshold \\ nil ) do
141129 params = maybe_put ( % { } , "threshold" , threshold )
142130
143- try do
144- Client . call ( "GET" , "/v1/health/queue/builds" , % { } , params )
145- |> handle_response ( )
146- rescue
147- error -> { :error , error }
148- end
131+ Client . call ( "GET" , "/v1/health/queue/builds" , % { } , params )
132+ |> handle_response ( )
133+ rescue
134+ error -> { :error , error }
149135 end
150136
151137 @ doc """
@@ -167,12 +153,10 @@ defmodule Appwrite.Services.Health do
167153 |> maybe_put ( "name" , name )
168154 |> maybe_put ( "threshold" , threshold )
169155
170- try do
171- Client . call ( "GET" , "/v1/health/queue/databases" , % { } , params )
172- |> handle_response ( )
173- rescue
174- error -> { :error , error }
175- end
156+ Client . call ( "GET" , "/v1/health/queue/databases" , % { } , params )
157+ |> handle_response ( )
158+ rescue
159+ error -> { :error , error }
176160 end
177161
178162 @ doc """
@@ -190,12 +174,10 @@ defmodule Appwrite.Services.Health do
190174 def get_queue_deletes ( threshold \\ nil ) do
191175 params = maybe_put ( % { } , "threshold" , threshold )
192176
193- try do
194- Client . call ( "GET" , "/v1/health/queue/deletes" , % { } , params )
195- |> handle_response ( )
196- rescue
197- error -> { :error , error }
198- end
177+ Client . call ( "GET" , "/v1/health/queue/deletes" , % { } , params )
178+ |> handle_response ( )
179+ rescue
180+ error -> { :error , error }
199181 end
200182
201183 @ doc """
@@ -245,12 +227,10 @@ defmodule Appwrite.Services.Health do
245227 def get_queue_functions ( threshold \\ nil ) do
246228 params = maybe_put ( % { } , "threshold" , threshold )
247229
248- try do
249- Client . call ( "GET" , "/v1/health/queue/functions" , % { } , params )
250- |> handle_response ( )
251- rescue
252- error -> { :error , error }
253- end
230+ Client . call ( "GET" , "/v1/health/queue/functions" , % { } , params )
231+ |> handle_response ( )
232+ rescue
233+ error -> { :error , error }
254234 end
255235
256236 @ doc """
@@ -268,12 +248,10 @@ defmodule Appwrite.Services.Health do
268248 def get_queue_logs ( threshold \\ nil ) do
269249 params = maybe_put ( % { } , "threshold" , threshold )
270250
271- try do
272- Client . call ( "GET" , "/v1/health/queue/logs" , % { } , params )
273- |> handle_response ( )
274- rescue
275- error -> { :error , error }
276- end
251+ Client . call ( "GET" , "/v1/health/queue/logs" , % { } , params )
252+ |> handle_response ( )
253+ rescue
254+ error -> { :error , error }
277255 end
278256
279257 @ doc """
@@ -291,12 +269,10 @@ defmodule Appwrite.Services.Health do
291269 def get_queue_mails ( threshold \\ nil ) do
292270 params = maybe_put ( % { } , "threshold" , threshold )
293271
294- try do
295- Client . call ( "GET" , "/v1/health/queue/mails" , % { } , params )
296- |> handle_response ( )
297- rescue
298- error -> { :error , error }
299- end
272+ Client . call ( "GET" , "/v1/health/queue/mails" , % { } , params )
273+ |> handle_response ( )
274+ rescue
275+ error -> { :error , error }
300276 end
301277
302278 @ doc """
@@ -314,12 +290,10 @@ defmodule Appwrite.Services.Health do
314290 def get_queue_messaging ( threshold \\ nil ) do
315291 params = maybe_put ( % { } , "threshold" , threshold )
316292
317- try do
318- Client . call ( "GET" , "/v1/health/queue/messaging" , % { } , params )
319- |> handle_response ( )
320- rescue
321- error -> { :error , error }
322- end
293+ Client . call ( "GET" , "/v1/health/queue/messaging" , % { } , params )
294+ |> handle_response ( )
295+ rescue
296+ error -> { :error , error }
323297 end
324298
325299 @ doc """
@@ -337,12 +311,10 @@ defmodule Appwrite.Services.Health do
337311 def get_queue_migrations ( threshold \\ nil ) do
338312 params = maybe_put ( % { } , "threshold" , threshold )
339313
340- try do
341- Client . call ( "GET" , "/v1/health/queue/migrations" , % { } , params )
342- |> handle_response ( )
343- rescue
344- error -> { :error , error }
345- end
314+ Client . call ( "GET" , "/v1/health/queue/migrations" , % { } , params )
315+ |> handle_response ( )
316+ rescue
317+ error -> { :error , error }
346318 end
347319
348320 @ doc """
@@ -360,12 +332,10 @@ defmodule Appwrite.Services.Health do
360332 def get_queue_certificates ( threshold \\ nil ) do
361333 params = maybe_put ( % { } , "threshold" , threshold )
362334
363- try do
364- Client . call ( "GET" , "/v1/health/queue/certificates" , % { } , params )
365- |> handle_response ( )
366- rescue
367- error -> { :error , error }
368- end
335+ Client . call ( "GET" , "/v1/health/queue/certificates" , % { } , params )
336+ |> handle_response ( )
337+ rescue
338+ error -> { :error , error }
369339 end
370340
371341 @ doc """
@@ -383,12 +353,10 @@ defmodule Appwrite.Services.Health do
383353 def get_queue_webhooks ( threshold \\ nil ) do
384354 params = maybe_put ( % { } , "threshold" , threshold )
385355
386- try do
387- Client . call ( "GET" , "/v1/health/queue/webhooks" , % { } , params )
388- |> handle_response ( )
389- rescue
390- error -> { :error , error }
391- end
356+ Client . call ( "GET" , "/v1/health/queue/webhooks" , % { } , params )
357+ |> handle_response ( )
358+ rescue
359+ error -> { :error , error }
392360 end
393361
394362 @ doc """
@@ -400,12 +368,10 @@ defmodule Appwrite.Services.Health do
400368 """
401369 @ spec get_storage_local ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
402370 def get_storage_local do
403- try do
404- Client . call ( "GET" , "/v1/health/storage/local" , % { } , % { } )
405- |> handle_response ( )
406- rescue
407- error -> { :error , error }
408- end
371+ Client . call ( "GET" , "/v1/health/storage/local" , % { } , % { } )
372+ |> handle_response ( )
373+ rescue
374+ error -> { :error , error }
409375 end
410376
411377 @ doc """
@@ -417,12 +383,10 @@ defmodule Appwrite.Services.Health do
417383 """
418384 @ spec get_storage ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
419385 def get_storage do
420- try do
421- Client . call ( "GET" , "/v1/health/storage" , % { } , % { } )
422- |> handle_response ( )
423- rescue
424- error -> { :error , error }
425- end
386+ Client . call ( "GET" , "/v1/health/storage" , % { } , % { } )
387+ |> handle_response ( )
388+ rescue
389+ error -> { :error , error }
426390 end
427391
428392 @ doc """
@@ -437,12 +401,10 @@ defmodule Appwrite.Services.Health do
437401 """
438402 @ spec get_time ( ) :: { :ok , HealthTime . t ( ) } | { :error , AppwriteException . t ( ) }
439403 def get_time do
440- try do
441- Client . call ( "GET" , "/v1/health/time" , % { } , % { } )
442- |> handle_response ( )
443- rescue
444- error -> { :error , error }
445- end
404+ Client . call ( "GET" , "/v1/health/time" , % { } , % { } )
405+ |> handle_response ( )
406+ rescue
407+ error -> { :error , error }
446408 end
447409
448410 @ doc """
@@ -454,12 +416,10 @@ defmodule Appwrite.Services.Health do
454416 """
455417 @ spec get_queue ( ) :: { :ok , HealthStatus . t ( ) } | { :error , AppwriteException . t ( ) }
456418 def get_queue do
457- try do
458- Client . call ( "GET" , "/v1/health/queue" , % { } , % { } )
459- |> handle_response ( )
460- rescue
461- error -> { :error , error }
462- end
419+ Client . call ( "GET" , "/v1/health/queue" , % { } , % { } )
420+ |> handle_response ( )
421+ rescue
422+ error -> { :error , error }
463423 end
464424
465425 @ doc """
@@ -477,12 +437,10 @@ defmodule Appwrite.Services.Health do
477437 def get_queue_audits ( threshold \\ nil ) do
478438 params = maybe_put ( % { } , "threshold" , threshold )
479439
480- try do
481- Client . call ( "GET" , "/v1/health/queue/audits" , % { } , params )
482- |> handle_response ( )
483- rescue
484- error -> { :error , error }
485- end
440+ Client . call ( "GET" , "/v1/health/queue/audits" , % { } , params )
441+ |> handle_response ( )
442+ rescue
443+ error -> { :error , error }
486444 end
487445
488446 @ doc """
@@ -500,12 +458,10 @@ defmodule Appwrite.Services.Health do
500458 def get_queue_usage ( threshold \\ nil ) do
501459 params = maybe_put ( % { } , "threshold" , threshold )
502460
503- try do
504- Client . call ( "GET" , "/v1/health/queue/usage" , % { } , params )
505- |> handle_response ( )
506- rescue
507- error -> { :error , error }
508- end
461+ Client . call ( "GET" , "/v1/health/queue/usage" , % { } , params )
462+ |> handle_response ( )
463+ rescue
464+ error -> { :error , error }
509465 end
510466
511467 @ doc """
@@ -523,12 +479,10 @@ defmodule Appwrite.Services.Health do
523479 def get_queue_usage_dump ( threshold \\ nil ) do
524480 params = maybe_put ( % { } , "threshold" , threshold )
525481
526- try do
527- Client . call ( "GET" , "/v1/health/queue/usage-dump" , % { } , params )
528- |> handle_response ( )
529- rescue
530- error -> { :error , error }
531- end
482+ Client . call ( "GET" , "/v1/health/queue/usage-dump" , % { } , params )
483+ |> handle_response ( )
484+ rescue
485+ error -> { :error , error }
532486 end
533487
534488 # --- Private Helpers ---
0 commit comments