#378 POST hooks should not affect ability to push
Closed: Fixed None Opened 4 years ago by codeblock.

I have a repo that has a POST hook enabled. The receiving end of the POST hook is currently offline. When I push to my repo, it hangs for a really long time, then gives me this ugly traceback:

remote: Emitting a message to the fedmsg bus.
remote: * Publishing information for 1 commits
remote: Traceback (most recent call last):
remote:   File "./hooks/post-receive.fedmsg", line 136, in <module>
remote:     msg=dict(commit=commit),
remote:   File "/usr/lib/python2.7/site-packages/pagure/lib/notify.py", line 94, in log
remote:     url, err))
remote: pagure.exceptions.PagureException: An error occured while querying: http://pagurehook.elrod.me:3000/pagure-haskell - Error: [Errno 110] Connection timed out
remote: Hook ./hooks/post-receive.fedmsg failed with error code 1

The POST hook system should be independent of any core functionality, I think (and probably handled by some external message queueing system).

(A random idea I just had is: What if the POST hook stuff was all moved to FMN? Then in FMN you could set the URL to POST to, and activate it for any message you care about (not limited to Pagure). This would need a lot of thought, but is just an idea. Of course we could still provide a UI for it in Pagure, and just have it use the FMN API to update the user's settings.).

I agree for the core of this report, not sure about the FMN part as I kinda would like to keep pagure self-contained if people want to deploy their own instance.

Login to comment on this ticket.