<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    I'm trying to add a postProcess method and it doesn't seem to run. <br>
    I'm working from the stock template script. I then add:<br>
    <blockquote><font face="monospace"> def postProcess(self, context,
        feedback):<br>
                feedback.pushInfo(2)<br>
                return {self.OUTPUT: dest_id}<br>
      </font><br>
    </blockquote>
    Obviously this isn't my actual goal for postProcess, but it's a way
    to verify if it ran since this should cause an error to be reported
    since feedback.pushInfo() expects a string, not an int.  (I have
    verified this by using the same line in processAlgorithm().<br>
    I get no error, so I conclude that the method is not being called,
    but I don't understand why.<br>
    <br>
    The docs say the postProcess:<br>
    <blockquote>Should be called in the main thread following the
      completion of runPrepared(). This method
      allows the algorithm to perform any required cleanup tasks. The
      returned variant map
      includes the results evaluated by the algorithm.<br>
    </blockquote>
    I'm assuming that whatever mechanism is calling prepare() and
    runPrepared() is responsible for calling postProcess when a script
    is executed from the Processing Toolbox. Digging through the code
    this appears to be the run() and finished() methods of
    QgsProcessingAlgRunnerTask, but that's where I get lost digging into
    the source - I can't figure out where this task object is created
    and the methods invoked. <br>
    <br>
    Thanks<br>
    David<br>
    <br>
  </body>
</html>