Jump to content

Sorting Notes in Ftrack - how it works?


Pawel Starzynski

Recommended Posts

Hi,

I'm trying to understand how notes are sorted in Ftrack. It looks like by time of creation, but what if I would like to create more than one note (in for loop) via API and do the commit at the end for all the notes, like this:

for comment in all_comments:
	ftrack_project.create_note(...)
ftrack.commit()

It looks like Ftrack doesn't create them in the order I've created them locally before commit. The order is totally random.

Even when I call ftrack.commit() for every create_note action, it still doesn't keep the right order:

for comment in all_comments:
	ftrack_project.create_note(...)
	ftrack.commit()

The order works only in that case (which is totally not acceptable):

for comment in all_comments:
	ftrack_project.create_note(...)
	ftrack.commit()
	time.sleep(1) # 1 second

To sum up:

Looks like the notes are sorted by time of creation, but with an accuracy of one second.

Can you help me solving this issue?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...