Decorators which accept parameters are a common use for closures. Closures are a common implementation mechanism for that sort of "function factory". I frequently choose to use closures in the Strategy Pattern
If you’re using the apscheduler library in your FastAPI app running in a Docker container, and you’re not seeing print messages in the container logs, it’s possible that the messages are being buffered by the apscheduler library or the Python interpreter, and are not being immediately flu...