0

I need to listen to the return " jira.search_issues (jql_str = "status = 'WAITING FOR SUPPORT'")) " and when the same switch executes an os.system (). I was not willing to use WHILE to avoid generating too many connections.

1 Answers1

0

Using while does not generate any more connections then you already are. Once the jira object exists, the connection has been made and will persist regardless of what calls you make. However, if you mean that you are not willing to make that many calls to the API, then there is no way in which you can "listen" as by definition a listener is continuously waiting and asking if anything has changed. If you are not willing to listen, then you have a few options:

  1. Perform jira.search_issues (jql_str = "status = 'WAITING FOR SUPPORT'")) in a while loop once every 30 minutes.
  2. Have some other service listen for you; for instance the automation for jira plugin is a good option in this case.
  3. Run the while loop in a separate thread.
Philip DiSarro
  • 1,007
  • 6
  • 9