synchronizes issue
The issue we are currently facing is that there's a feature in my business that synchronizes the balance, and this script runs every 15 seconds. When I execute it, I need a parameter, the starting block number.
If the script doesn't finish within 15 seconds, in reality, another task is initiated. The effect of this task is actually the same as the previous one, but when recording the amount, the situation of having the same txhash occurs, which essentially wastes the resources of one execution.
I can add a field in the table to judge this, but this also occupies the read and write of the table.
I hope there could be a system-level variable that lets me distinguish whether this task is currently in execution.
Alternatively, is it possible to create a type for the cron? For instance, if it is an exclusive cron, then it does not allow concurrent execution.
2 Replies
See this ( https://github.com/JamesCowling/convex-action-retrier ) which uses https://docs.convex.dev/scheduling/scheduled-functions#retrieving-scheduled-function-status
GitHub
GitHub - JamesCowling/convex-action-retrier: Helper function to ret...
Helper function to retry a Convex action until it succeeds. - GitHub - JamesCowling/convex-action-retrier: Helper function to retry a Convex action until it succeeds.
Scheduled Functions | Convex Developer Hub
Convex allows you to schedule functions to run in the future. This allows you to
thank you let mecheck