Hui Zheng

    1 year ago
    Hello, I ran into another issue with timeout setting. I would like to set a default timeout for all the tasks. I shall be able to do it through environment variable
    according to this doc
    However, when I do it properly, I got an error.
    TypeError: Only integer timeouts (representing seconds) are supported.
    even when I assigns the integer value. (See thread for details)
    I set the default variable in
    flow.storage = Docker(
            # set prefect.config
    All other default variables works, but TIMEOUT failed. error log
    Traceback (most recent call last):
      File "flow.local-test.py", line 1, in <module>
        from flow import flow
      File "/app/flow.py", line 155, in <module>
        def fetch_runnable_models(current_stamp: datetime) -> list:  # noqa
      File "/usr/local/lib/python3.8/site-packages/prefect/utilities/tasks.py", line 399, in <lambda>
        return lambda fn: prefect.tasks.core.function.FunctionTask(
      File "/usr/local/lib/python3.8/site-packages/prefect/tasks/core/function.py", line 63, in __init__
        super().__init__(name=name, **kwargs)
      File "/usr/local/lib/python3.8/site-packages/prefect/core/task.py", line 279, in __init__
        raise TypeError(
    TypeError: Only integer timeouts (representing seconds) are supported.
    Michael Adkins

    Michael Adkins

    1 year ago
    Hi! This looks like a bug in our processing of this config value. I’ve opened a PR to fix it but I haven’t had a chance to test it / add additional tests covering this to our code. It’s available at https://github.com/PrefectHQ/prefect/pull/3761 if you’d like to give it a try in the meantime.