Stop worker from running after X amount of requests to it.

Hi there, I was wondering if there was a way I could stop requests going to a worker if that worker has reached x amount of requests.
Example:
If my limit is 100,000, how could I stop it at 50,000?

Thanks for any help in advance.
Was this page helpful?