jina-ai/jina

A type check before appending

ai-naymul opened this issue · 5 comments

Describe your proposal/problem

Should we make a type check in the push function on the request parameter before appending it to the _requests list? @JoanFM

Reference: https://github.com/jina-ai/jina/blob/master/jina/serve/runtimes/worker/batch_queue.py

Environment

  • jina 3.20.4
  • docarray 0.38.0
  • jcloud 0.2.16
  • jina-hubble-sdk 0.39.0
  • jina-proto 0.1.27
  • protobuf 4.24.3
  • proto-backend upb
  • grpcio 1.58.0
  • pyyaml 6.0.1
  • python 3.11.4
  • platform Windows
  • platform-release 10
  • platform-version 10.0.19045
  • architecture AMD64

Screenshots

kutta

Like that:

mutta

There is no need since noone has yet raised an issue because of this. If you have seen any case where this is a problem, please report and share a way to reproduce.

Thanks for the suggestion

There is no need since noone has yet raised an issue because of this. If you have seen any case where this is a problem, please report and share a way to reproduce.

Thanks for the suggestion

Got it

Should we add a try except block in the handle_request function:
lokka

Like that:
fokka

And should we make the shutdown function into two part one for the resource:
jokka

Like that:
eokka

Code reference: jina/serve/runtimes/servers/load_balancer.py

Should we add a try except block in the handle_request function: lokka

Like that: fokka

And should we make the shutdown function into two part one for the resource: jokka

Like that: eokka

Code reference: jina/serve/runtimes/servers/load_balancer.py

@JoanFM

There is no need until any issue appears because of that.