Questions about $checkpoint and concurrency

This topic was automatically generated from Slack. You can find the original thread here.

Neil Lovelace : Good Morning All,
I have a question about the $checkpoint feature. I’ve followed the example provided in the Pipedream documentation and its working. I performed a real test from my source which sent two hooks ~ 3 seconds apart ( 09:26:55 AM and 09:26:58 AM ). The $checkpoint value was updated correctly but data was processed twice. When I replayed these incoming hooks, the $checkpoint did exactly what I wanted it to do almost instantly.

If the workflow can determine that it ran previously in less than 1 second on a replay, why did it allow the workflow to run twice with 3 seconds between each incoming hook?
Any suggestions or tips on how to resolve this ?

image.png

Dylan Sather (Pipedream) : the timing may have been coincidence, and the use of $checkpoint will not coordinate the timing / execution of events on your workflow. I’m not sure I understand the exact problem you’re facing, though - can you perhaps share your workflow with dylan@pipedream.com and clarify the specific issue more?

Also - when you use $checkpoint , I’d recommend serializing the execution of your workflow by setting its concurrency to 1 (see the docs on managing concurrency and throttling). This way, even if two executions arrive at the same time, only one will run through the workflow at a time, ensuring that $checkpoint updates before the next run begins.

Dylan Sather (Pipedream) : FYI - we may be a little slow to respond over the next few days due to the Christmas holiday, but I’ll get back to you ASAP

Neil Lovelace : , Thanks for this. I went to look at Concurrency and throttling, but It isn’t enabled on my account (Free). Is this a paid feature?

Neil Lovelace : FYI.

image.png

Dylan Sather (Pipedream) : Hey Neil, it is available on the free tier, but it only applies to workflows triggered by an event source. If you’re using the native HTTP / email / cron trigger, for example, concurrency controls aren’t yet enabled for those.

If you want to trigger a workflow on HTTP requests, for example, you’ll want to choose the HTTP / Webhook icon on the top-left , which creates an HTTP event source that triggers your workflow, instead of using the native HTTP trigger (on the right).

Neil Lovelace : You’re a lifesaver. I’ll check this out.

Neil Lovelace : Would you mind helping me understand why I’m not able to access the data? I added you as a collaborator just now.

Neil Lovelace : The error I’m getting says that it cannot read property data of undefined. I thought I had this correctly pointing to the trigger… even following the on-screen prompts.

Dylan Sather (Pipedream) : can you try sending a real HTTP request to that endpoint, with the data you expect? Currently there’s no data in steps.trigger.event, which is why you’re getting the error:

Neil Lovelace : My apologies Dylan. I swear I did that and had data appearing. I made a change and now I’m getting data via webhook.

Dylan Sather (Pipedream) : no problem, glad you got it working