Thread
#prefect-community
    k

    Koby Kilimnik

    4 months ago
    i have 4 simple flows i ran periodically every hour and for some reason it looks like i am running more than 20k tasks, are clock registrations being multiplied in some way?
    Kevin Kho

    Kevin Kho

    4 months ago
    I’m not getting what you mean by clock registrations here. Could you elaborate? Do you mean you added multiple clocks to the schedule?
    k

    Koby Kilimnik

    4 months ago
    no i have a dlow in which i simply create an interval clock
    i was wondering, when i bump the version and re-register
    Kevin Kho

    Kevin Kho

    4 months ago
    Can you show me in code?
    k

    Koby Kilimnik

    4 months ago
    what happens to the old version clock
    sure
    def _create_clock(env_name: str, tables: list[str], optimized_format: str) -> Clock:
        return IntervalClock(
            interval=OPTIMIZED_TABLE_CREATION_INTERVAL,
            parameter_defaults={
                "env_name": env_name,
                "tables": tables,
                "optimized_format": optimized_format,
            },
        )
    this is passed to:
    clocks = _create_clocks(...)
    Schedule(clocks=clocks)
    Kevin Kho

    Kevin Kho

    4 months ago
    The clock/schedule in general will not be tied to the task run count. It would be tied to the Flow run count. I think you could see in the dashboard if you have more flow runs than you are expecting. To answer though, the old version of the Flow is archived when you re-register and won’t be used
    k

    Koby Kilimnik

    4 months ago
    yeah but i would assume that if i have a 1 per 3 hours run for a flow
    with about 10 tasks in each flow
    that would mean i would have in general 4*10 task runs a day
    not 20k , so i was wondering if i have a bug and that the old clocks are still set somewhere
    since its intervals it would be
    410 (deploy count)
    (using prefect cloud)
    looking at the run logs it looks like i dont have that many , which is weird
    Kevin Kho

    Kevin Kho

    4 months ago
    You can check the schedule tab of the Flow to verify, but no previous Flow versions can’t be run by Prefect Cloud. You would get an error if it were attempted
    k

    Koby Kilimnik

    4 months ago
    thanks