Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The db2 library expands the built-in db table of functions by incorporating the retry functionality from the https://docs.interfaceware.com/docs/IguanaX_Documentation_Home/Development/iNTERFACEWARE_Libraries/Retry_Library_2713911370 into the standard database functions. The db2.connect() function sets up the database connection object with built-in retries whenever an error occurs. It takes the same arguments as the default db.connect() function, with two additional optional parameters:

  • retry_count - sets the number of retries to perform on the database connection (default = 100)

  • retry_pause - sets the time in seconds to wait between retries (default = 10)

For example, here the we are initializing the database connection object with 10 retries and a pause of five seconds between each call:

...