We have a microservice that runs in a container. We need to run temporal scheduled workflows using the same codebase.We have 2 separate temporal worker containers that will execute the scheduled workflows. The worker containers are separate from the main container We have 2 proposed architectures but we are not sure which one is best from temporal’s standpoint.
Put the starter code in the main container so that on its startup, it will register the scheduled activities with the temporal server
Put the starter code as a go routine in the worker containers so that it registers the workflows when the workers startup
We will be using a unique WorkflowID to prevent duplicate scheduled workflows for both approaches. What would be the best architecture here from temporal’s standpoint?