testing out new event workflow
1 1

2 posts in this topic

Hello,

 

New to ftrack and its nomenclature.

Does any one have a good workflow for creating and testing new event plugins?

I currently find my self having to create a new shot everytime i want to test new code in the plugin.

I also noticed that i cant query an event, if i try :

[e.get('id') for e in session.query('select id,data from Event')]

the ids are int's and not the database object id that the event entity like other ftrack entities use.

 

Any help or an arrow in the right direction would be great.

Cheers

Kym

Share this post


Link to post
Share on other sites

Hi Kym,

For the workflow, I would recommend recording and storing an example of some event data and use that data to mock a call to your callback.

The events you receive from the event hub are different from the stored `Event` entities. Events are stored for certain kind of `ftrack.update` (mainly, inserts/updates/deletes of items in the project hierarchy) event hub events and are used internally for notifications and activities.

The ids of Events are incremental so that they can be easily traversed based on the order of occurrence. As far as I am aware, there is currently no way to map an event hub event to a stored Event.

As a side note, the number of stored Events can grow quite large and it is not recommended to query all events. You can use limitoffset and QueryResult.first() to only select a few events when testing.

Regards,
Lucas

Share this post


Link to post
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
1 1