diff --git a/simpleflow/swf/executor.py b/simpleflow/swf/executor.py index 5b47269b4..19ff8e90a 100644 --- a/simpleflow/swf/executor.py +++ b/simpleflow/swf/executor.py @@ -115,6 +115,11 @@ def _get_future_from_activity_event(self, event): activity_type.name, self.domain.name)) return None + logger.info('failed to schedule {}: {}'.format( + event['activity_type']['name'], + event['cause'], + )) + return None elif state == 'started': future._state = futures.RUNNING elif state == 'completed': @@ -239,6 +244,8 @@ def resume(self, task, *args, **kwargs): future = futures.Future() # return a pending future. if self._open_activity_count == constants.MAX_OPEN_ACTIVITY_COUNT: + logger.warning('limit of {} open activities reached'.format( + constants.MAX_OPEN_ACTIVITY_COUNT)) raise exceptions.ExecutionBlocked return future @@ -303,6 +310,10 @@ def replay(self, history): try: result = self.run_workflow(*args, **kwargs) except exceptions.ExecutionBlocked: + logger.info('{} open activities ({} decisions)'.format( + self._open_activity_count, + len(self._decisions), + )) return self._decisions, {} except exceptions.TaskException, err: reason = 'Workflow execution error in task {}: "{}"'.format(