Run Script on Asset Server Commit/Update

I need to run a script (similar to PostProcessBuildPlayer) when a developer updates or commits to the asset server. I found the AssetPostprocessor, but it doesn't handle the asset server events directly... any thoughts?

You could do this with some duct tape like solution. The flashbang guys have had a fair amount of success of making a web based viewer of Asset Server activity. Basically you'll need to periodically peek in the postgresql database, and if you see something new, run your script.

Not really elegant, but I figured I'd add a workaround in case you need it badly.

I don't think it's possible. You can however run a script after import, which is always triggered when after updating from the asset server.

Building on Lucas's answer, if you didn't want to continuously poll Postgres you could perhaps write a trigger in C and use Postgres's trigger capability on insertion. But if you want a quick solution its probably better to poll the database. You could do that very simply with a script. For example, under OS X you can run:

psql -h server.hostname.com -p myPort -U myUsername -d myDatabase -c "select 'revision',max(serial) as serial from changeset;" | grep revision | cut -c15-

to get the latest revision number from the asset server. If you store this value you can compare the current asset server reversion against the previous one and take action. Otherwise your script can just exit until the next time you poll the database.