---
** [tickets:#7142] Better conditional around sending zarkov events**
**Status:** closed
**Milestone:** asf_release_1.2.0
**Labels:** bitesize
**Created:** Thu Feb 06, 2014 06:38 PM UTC by Dave Brondsema
**Last Updated:** Sat Jan 03, 2015 10:07 AM UTC
**Owner:** Dave Brondsema
Zarkov events are optional, but the code just checks to see if the 'zmq' lib is
installed and it should really be checking to see if zarkov.host is configured.
If zmq is installed but zarkov.host is not configured (and a zarkov is not
listening) then it'll hang as shown below. Fix should be around app_globals.py
line 338
~~~~
"/home/jetmind/p/42cc/allura/sourceforge-allura/Allura/allura/app.py", line
464, in install
session(discussion).flush()
File
"/home/jetmind/.virtualenvs/allura/local/lib/python2.7/site-packages/ming/odm/base.py",
line 30, in inner
call_hook(obj, after_meth, *args, **kwargs)
File
"/home/jetmind/.virtualenvs/allura/local/lib/python2.7/site-packages/ming/odm/base.py",
line 16, in call_hook
getattr(e, hook_name)(*args, **kw)
File
"/home/jetmind/p/42cc/allura/sourceforge-allura/Allura/allura/model/session.py",
line 75, in after_flush
g.zarkov_event('create', extra=obj.index_id())
File
"/home/jetmind/p/42cc/allura/sourceforge-allura/Allura/allura/lib/app_globals.py",
line 365, in zarkov_event
self._zarkov.event(event_type, context, extra)
File
"/home/jetmind/p/42cc/allura/sourceforge-allura/Allura/allura/lib/zarkov_helpers.py",
line 38, in event
self._sock.send(bson.BSON.encode(obj))
File "socket.pyx", line 530, in zmq.core.socket.Socket.send
(zmq/core/socket.c:4905)
File "socket.pyx", line 577, in zmq.core.socket.Socket.send
(zmq/core/socket.c:4673)
File "socket.pyx", line 174, in zmq.core.socket._send_copy
(zmq/core/socket.c:1915)
File "checkrc.pxd", line 11, in zmq.core.checkrc._check_rc
(zmq/core/socket.c:5511)
File
"/home/jetmind/.virtualenvs/allura/local/lib/python2.7/site-packages/async/__init__.py",
line 21, in thread_interrupt_handler
prev_handler(signum, frame)
KeyboardInterrupt
~~~~
---
Sent from forge-allura.apache.org because [email protected] is subscribed
to https://forge-allura.apache.org/p/allura/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://forge-allura.apache.org/p/allura/admin/tickets/options. Or, if this is
a mailing list, you can unsubscribe from the mailing list.