Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Is It Generally Recommended To Close Api Client Sessions? Like If I Open A Client Like This:

is it generally recommended to close API client sessions? Like if I open a client like this:
from clearml.backend_api.session.client import APIClient client = APIClient() ...Some of the tasks I have are services which such a client open all the time, but these tasks generally do something and then sleep for 24 hours (such as cleanup).
Just wondering if a better practice would be to open and close the sessions when necessary.

  
  
Posted one year ago
Votes Newest

Answers 3


can you elaborate a bit on the token side? i'm not sure exactly what would be a bad practice here

  
  
Posted one year ago

Hi ElegantCoyote26 , by default, sessions simply generate a time-limited token and do not consume server resources. You can keep such a session, or start a new one, it shouldn't make any difference (of course, generating a token requires a little bit of work on the server side, so constantly doing that is not a good practice)

  
  
Posted one year ago

Generating a token is another API call the server needs to handle, so if you have a lot of services constantly running, using the same session in each service saves up on API calls and thus puts less load on the server

  
  
Posted one year ago
604 Views
3 Answers
one year ago
one year ago
Tags