in reply to perl script and queue
Hello k_manimuthu,
It is strange how you call your insert script that fast that MySQL is not able to handle the insert statements. The easy way for me would be to connect your scripts either by creating loops and when you reach the end of the loop call next insert.
Alternatively you can use Thread::Queue. But I would first try to see if I can create an OO approach for the insert statements instead of calling the script by each self.
But this is my idea on how to approach the problem, maybe another monk has another idea.
Update: You can also in case you use the MySQL DB you can call the function INSERT ... ON DUPLICATE KEY UPDATE Syntax.
Update2: Or as fellow monk hippo proposed Ensuring only one copy of a perl script is running at a time.
Hope this helps, BR.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl script and queue
by 1nickt (Canon) on Aug 07, 2017 at 14:34 UTC | |
by thanos1983 (Parson) on Aug 07, 2017 at 15:22 UTC |