Skip to content

Commit

Permalink
Merge pull request #53 from ARGOeu/devel
Browse files Browse the repository at this point in the history
Version 0.3.4
  • Loading branch information
themiszamani authored Mar 7, 2019
2 parents f5fc903 + 27858c9 commit 3b9a8d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion argo-nagios-ams-publisher.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
%endif

Name: argo-nagios-ams-publisher
Version: 0.3.3
Version: 0.3.4
Release: 1%{mydist}
Summary: Bridge from Nagios to the ARGO Messaging system

Expand Down Expand Up @@ -109,6 +109,8 @@ if ! /usr/bin/getent group nagiocmd &>/dev/null; then
fi

%changelog
* Wed Mar 6 2019 Daniel Vrcic <dvrcic@srce.hr> - 0.3.4-1%{?dist}
- verbose log messages for errors not handled in argo-ams-library
* Tue Feb 5 2019 Daniel Vrcic <dvrcic@srce.hr> - 0.3.3-1%{?dist}
- ARGO-1624 Catch all exceptions and warnings from AMS
* Thu Nov 8 2018 Daniel Vrcic <dvrcic@srce.hr> - 0.3.2-1%{?dist}
Expand Down
7 changes: 5 additions & 2 deletions pymod/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,17 @@ def _write(self, msgs):
time.sleep(self.shared.runtime['evsleep'])
i += 1
else:
self.shared.log.warning('{0} {1} Giving try: {2} after {3} seconds'.format(self.__class__.__name__, self.name, t, s))
self.shared.log.warning('{0} {1} Giving try: {2} after {3} seconds'.
format(self.__class__.__name__, self.name, t, s))
pass

# catch errors not handled in ams-library, report them in
# logs and retry
except Exception as e:
self.shared.log.error('{0} {1}: {2}'.format(self.__class__.__name__, self.name, e))
self.shared.log.error('Retry after unexpected error')
time.sleep(self.shared.runtime['evsleep'])
self.shared.log.error('Unexpected error, retry after {0} seconds'.
format(self.shared.runtime['evsleep']))
pass

finally:
Expand Down

0 comments on commit 3b9a8d8

Please sign in to comment.