Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Signal to end a job with success

Zeph
2012-08-07
2012-12-11
  • Zeph
    Zeph
    2012-08-07

    Hi,
    Due to a bug in Maya there is a need for me to terminate a job after detecting certain string pattern in the log. Currently I used the parser to send a failed signal so that the job will be terminated immediately. Although this works correctly, I am wondering if there is a success or finished signal that I can send to the job instead of failed. Thanks so much.

     
  • Timur Hairulin
    Timur Hairulin
    2012-08-07

    No, on fail afrender sends to arserver only error message. And there is no options for it.
    But it is not so hard to implement.
    Where such option should be preset?
    And, of course, this option should not be always active, may be there is a "real" error. So such option should be activated in a parser on some stdout?

     
  • Zeph
    Zeph
    2012-08-07

    I am not so sure how the code works… Currently I am doing this.
    class irradiance(parser.parser):
        …
        …
        if data.find(error) > -1:
            self.error = True

    So maybe instead of self.error = True, I can do like self.finished = True
    and this will send a signal to the job that it is done.

     
  • Timur Hairulin
    Timur Hairulin
    2012-08-07

    So you want parser to be able to stop a task and make afrender to send finished (with success) signal to afserver?

     
  • Zeph
    Zeph
    2012-08-07

    Yes… I am thinking along that line. But I am okay if you have other thoughts about this.

     
  • Timur Hairulin
    Timur Hairulin
    2012-08-07

    Yes. It can be a useful feature. Right now i am processing other useful things.
    But I will create an issue.
    But! You can try to do it yourself :)

     
  • Zeph
    Zeph
    2012-08-08

    I would love to give it a try. But I may not have enough knowledge of afanasy to get it working. And I have too many things on my hand now. :(