add get_service_with_docs_by_service_type() #35
Reference in New Issue
Block a user
No description provided.
Delete Branch "service_by_service_type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Build succeeded. https://zuul.otc-service.com/t/gl/buildset/40839dd46402477e9783b92fc3fe3bbe
@ -212,0 +226,4 @@
for service in services['services']:
if service['service_type'] == service_type:
res['service'] = service
break
why break is required here? There’s only unique service_type in services so after the if condition for the matching service_type you should get exactly one matching res[‘service’] even after completing the loop.
You are right, that the break is not necessary. The reason I use it here is to shorten the runtime a bit. The loop breaks because 1 result is expected, otherwise the loop would run further which is not necessary and results in larger runtime of this loop.
Build succeeded. https://zuul.otc-service.com/t/gl/buildset/bfe27bd4fd7e4ce2bb866ac37b110d99
Build succeeded. https://zuul.otc-service.com/t/gl/buildset/4dac254a5b4747a6b878c80f47355f28