Hooks fire twice?

60 views
Skip to first unread message

Marcus

unread,
Sep 1, 2011, 7:34:56 AM9/1/11
to Podio API
I've registered a hook for item.create in a custom app. When I click
the Save button in Podio, the hook is immediately called. Problem is,
after 4-5 seconds it is fired again with the exact same parameters.
The hook response is HTTP 200, so I'm guessing it can't be some kind
of retry mechanism. I can of course work around it by keeping track of
which item_id's have been handled, but I still wanted to drop a little
questionmark here..?

Yehia Abel Salam

unread,
Jul 14, 2012, 10:35:53 AM7/14/12
to podi...@googlegroups.com
i'm facing the same problem here, did you figure out what the problems was?

Matthijn Dijkstra

unread,
Jul 14, 2012, 11:19:29 AM7/14/12
to podi...@googlegroups.com
The hook get called again if you modify it with your system. You need to keep track of who made the latest revision.

Sent from my iPhone

Yehia Abel Salam

unread,
Jul 14, 2012, 12:44:57 PM7/14/12
to podi...@googlegroups.com
actually i am noticing another behavior, if you didn't return an HTTP 200 immediately, or in a timely manner, Podio seems to send the event again, can anybody confirm this?

Christian Holm

unread,
Jul 14, 2012, 3:38:38 PM7/14/12
to podi...@googlegroups.com
Hi guys

I think this is different cases. The HTTP library we use for firing the hooks have a quite annoying "feature" where it retries the request if it times out. We should switch to another library that doesn't try to be so smart. I am on vacation this week, so I won't be able to do that until a week from now.

Regarding the original question, can you check what the "type" parameter is set to when the second hook call is made? If it is really the same parameters, I would guess you have two hooks identical hooks registered.

Christian

Yehia Abel Salam

unread,
Jul 14, 2012, 7:32:02 PM7/14/12
to podi...@googlegroups.com
sounds good, so you actually have access to the api and can change the behavior this week, because i'm depending on it to close a podio plugin.

Christian Holm

unread,
Jul 15, 2012, 2:24:12 AM7/15/12
to podi...@googlegroups.com
I can change it, but not until the week after the week starting now, ie. something like the 24th of July.

Until then I would recommend returning HTTP 200 OK within 15 seconds. 15 seconds is a pretty long timeout, and web requests should generally finish well before that. Perhaps you can just respond OK to the hook call and then proceed with your process?
Reply all
Reply to author
Forward
0 new messages