+# run a Python command asynchronously
+def fire_and_forget(f):
+ def _fire_and_forget():
+ try:
+ f()
+ except Exception:
+ logger.critical("fire_and_forget: Got exception out of callback:\n%s" % traceback.format_exc())
+ t = threading.Thread(target=_fire_and_forget)
+ t.start()
+