Best Technique for Restarting Entire Workflow in Python SDK?

  1. Yes, this is idiomatic. We have plans to allow activity rescheduling next attempt without raising an exception to make it nicer. But for now, your approach is fine. An alternative for frequent polls is to implement polling loop directly inside the activity. Such activity would need to heartbeat to be restarted in case of worker failure.
  2. No. Two steps with such different timeout and retry characteristics don’t belong in a single activity.
  3. In this case, failing the whole workflow and relying on its retry options is fine. Another approach is a loop that retries these two activities. Such workflow would need to call continue-as-new after a few hundred iterations of the loop