Force Maintenance action on upload?

Zeno

Joined: 2009-03-02
Posts: 3
Posted: Mon, 2009-03-02 20:52

Let's say I want to make G2 perform a certain Maintenance task (in this case, Keywords to Tags) on each upload of an image. How would this be done? The class is
class KeywordsToTags extends MaintenanceTask
And I'd need to call the run() function in this class. But I am not sure how to call this class in the code. I would assume something like this:

require(KeywordsToTags.class);
$keyToTag = new KeywordsToTags();
$keyToTag->run();

Nor am I sure where I would put the call in the code.

I don't want to have to keep performing this task manually every time I upload an image.