Jump to content

testing out new event workflow


Kym Watts

Recommended Posts

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

Link to comment
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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...