I have some command line scripts -- the kind you run with "bin/instance run script.py" -- and sometimes when I run them I have conflict errors while trying to commit the transaction. It occurs because there are other users managing content on the site simultaneously.
My question is: how to implement the same retry mechanism that Plone uses when handling the regular requests. I want my script to behave as if the code is being executed in a view, for example.