mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
before returning the cookie in the driver, wait for health checks https://docs.docker.com/engine/reference/builder/#healthcheck if provided. for images that don't have health checks, this will have no affect (an added call to inspect container, for hot it's small potatoes). this will be useful for containers so that they can pull large files or do setup that takes a while before accepting tasks. since this is before start, it won't run into the idle timeout. we could likely use these for hot containers in general and check between runs or something, but didn't do that here. one nascient concern is that for hot if the containers never become healthy I don't think we will ever kill them and the slot will 'leak'. this is true for this and for other cases (pulling image) I think, we should probably recycle hot containers every hour or something which would also close this. anyway, not a huge blocker I don't think, there will likely be 1 user of this feature for a bit, it's not documented since we're not sure we want to support it. closes #336