Skip to content

Cron jobs timeout after 300 seconds when timeout=None #465

Open
@Graeme22

Description

@Graeme22

Given the following settings:

async def long_job(ctx):
    # simulate job that takes a long time
    await asyncio.sleep(3600)


class WorkerSettings:
    cron_jobs = [
        cron(long_job, run_at_startup=True)
    ]
    # ...

the job times out after 300 seconds with TimeoutError, even though the timeout is None, which is the default for cron jobs.
I believe the culprit is this line, which replaces the None value although None may be desired.

If desired I can submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions