Fixed the logic to prevent multiple instances from being spawned
This PR addresses a bug pointed out in OC-4205's comment
JIRA tickets: OC-4205
Testing instructions:
Since the API call [/api/v1/openedx_appserver/] does not call the spawn_appserver without num_count, the way to test it is probably via the management command instance_redeploy.py It should break on success even if num_attempts >1.
Reviewers
@UmanShahzad @xitij2000