From: Aaron Schulz Date: Tue, 16 Apr 2013 07:28:45 +0000 (-0700) Subject: Some tweaks to the database commit callback docs. X-Git-Tag: 1.31.0-rc.0~19988 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=d4043766c040278a8efe25eb2f575e7f42d02e09;p=lhc%2Fweb%2Fwiklou.git Some tweaks to the database commit callback docs. Change-Id: Ifc1687f5393046d000a49aa7850c6454d03154b8 --- diff --git a/includes/db/Database.php b/includes/db/Database.php index f4d194da12..87d5f815a3 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -2968,7 +2968,9 @@ abstract class DatabaseBase implements DatabaseType { * If there is a transaction and it is rolled back, then the callback is cancelled. * Callbacks must commit any transactions that they begin. * - * This is useful for updates to different systems or separate transactions are needed. + * This is useful for updates to different systems or when separate transactions are needed. + * For example, one might want to enqueue jobs into a system outside the database, but only + * after the database is updated so that the jobs will see the data when they actually run. * It can also be used for updates that easily cause deadlocks if locks are held too long. * * @param Closure $callback @@ -2987,7 +2989,7 @@ abstract class DatabaseBase implements DatabaseType { * Callbacks must not start nor commit any transactions. * * This is useful for updates that easily cause deadlocks if locks are held too long - * but where atomicity is strongly desired for these and some related updates. + * but where atomicity is strongly desired for these updates and some related updates. * * @param Closure $callback * @since 1.22