Is there a way where we can add delay/wait of 3 to 5 seconds before every post call? By: Manjunath Singh Hi, I have a requirement where i need to post (http client post call) a data by splitting it into multiple batches, like 100 records per batch. So, is there a way where we can add delay/wait of 3 to 5 seconds before every post call?
Yes, there are several ways to add a delay/wait of 3-5 seconds before every HTTP POST call in SnapLogic, especially when you need to split data into batches and process them with delays. Here are the recommended approaches: Method 1: Using Script Snap with time.sleep() (Recommended) Added Delay Script Snap New Snap Added:
Delay Script (Remote Python Script) - Introduces a 4-second delay before each HTTP POST call using Python's time.sleep() function
Pipeline Flow Changes:
Disconnected: Mapper (snap_2) from HTTP Client (snap_3)
Connected: Mapper (snap_2) to Delay Script (snap_5)
Connected: Delay Script (snap_5) to HTTP Client (snap_3)
Script Functionality:
Uses Python's time.sleep(4) to pause execution for 4 seconds (middle value of the requested 3-5 second range)
Passes input data through unchanged to maintain data integrity
Implements the required snaplogic_init(), snaplogic_process(), and snaplogic_final() functions for the Remote Python Script Snap
