mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
we had the inspect container here for 3 reasons: 1) get exit code 2) see if container is still running (debugging madness) 3) see if docker thinks it was an OOM 1) is something wait returns, but due to 2) and 3) we just delayed it until inspection 2) was really just for debugging since we had 3) 3) seems unnecessary. to me, an OOM is an OOM is an OOM. so why have a whole docker inspect call just to find out? (we could move this down, since it's a sad path, and make the call only when necessary, but are we really getting any value from this distinction anyway? i've never ran into it, myself) inspect was actually causing tasks to time out, since the call to inspect could put us over our task timeout, even though our container ran to completion. we could have fixed this by checking the context earlier, but we don't really need inspect either, which will reduce the docker calls we make, which will make more unicorn puppers. now tasks should have more 'true' timeouts. tried to boy scout, but tracing patch also cleans this block up too.
This package is intended as a general purpose container abstraction library. With the same code, you can run on Docker, Rkt, etc.