Skip to content

do_profile doesn't work as a decorator #1638

@MustafaJafar

Description

@MustafaJafar

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior:

using do_profile as a decorator fails. (if I'm not using it wrong 😅)

Expected Behavior:

No response

Version

1.7.1

What platform you are running on?

Windows

Steps To Reproduce:

Run this in AYON console.

import os
from ayon_core.lib.profiling import do_profile

@do_profile()
def get_bundle_settings(bundle_name):
    import ayon_api 

    return ayon_api.get_addons_settings(bundle_name)


bundle_name = os.getenv("AYON_BUNDLE_NAME")
settings = get_bundle_settings(bundle_name)

Are there any labels you wish to add?

  • I have added the relevant labels to the bug report.

Relevant log output:

Traceback (most recent call last):
  File "<string>", line 4, in <module>
TypeError: do_profile() missing 1 required positional argument: 'fn'

Additional context:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions