How to disable a worker from the Temporal client side?

Background: We are trying to transition from our current in-house-built workflow management to Temporal. During the transition, some workflows will be on Temporal and some still on the old system. One worker host machine will run both a temporal worker and a old worker, and we must enforce only one is executing a workflow at any given time. Both cannot be running workflows concurrently. When the old workflow engine is assigning a workflow to the host, I would like to disable the temporal worker on the machine on the server side and re-enable it after the workflow is completed by the worker of the old system.
Question: How can I disable a temporal worker by its ID from the Temporal client side, i.e., the server side, not the worker side?

Why do you care about where workflows run? They don’t produce any side effects directly. Is your limitation that certain activities cannot be executed concurrently on the host?

Each machine that hosts a temporal worker also hosts the current workflow engine client of an in-house built system. When the machine is running a task from the current old in-house engine, we would like to pause the temporal worker from running new activities. That’s why we would like to pause certain temporal worker on demand. Thanks

You could suspend temporal worker meaning it would not poll for new taks (currently running one can complete tho)

How to do that? thanks

Which sdk do you use? For Java see

worker.suspendPolling();
worker.resumePolling();

When the machine is running a task from the current old in-house engine, we would like to pause the temporal worker from running new activities.

This sounds like a scary hack. Have you considered running your in-house engine in a Temporal activity and setting parallelism of activities to 1?

We have thousands of tasks implemented in the current system and they cannot be all migrated to Temporal at once. There has to have a transition period which could be long.

I’m pretty sure that should be a better way. Can you control the legacy system lifecycle in any way?