Commit d08395ac1308727dd45396083f454c47605c0604

  • avatar
  • Francois Marier <francois @cata…st.net.nz>
  • Mon Jun 14 05:41:01 CEST 2010
Move the transaction to the inner loop

One failing handler should not revert the work done by the
successful ones.

Note that there is a continue in that loop so the transaction
has to avoid that.

Signed-off-by: Francois Marier <francois@catalyst.net.nz>
  
188188
189189function activity_process_queue() {
190190
191 db_begin();
192191 if ($toprocess = get_records_array('activity_queue')) {
193192 // Hack to avoid duplicate watchlist notifications on the same view
194193 $watchlist = activity_locate_typerecord('watchlist');
200200 }
201201 $viewsnotified[$data->view] = true;
202202 }
203
204 db_begin();
203205 try {
204206 handle_activity($activity->type, $data, true);
205207 }
210210 // log them and continue
211211 log_debug($e->getMessage());
212212 }
213 db_commit();
213214 }
214215 delete_records('activity_queue');
215216 }
216 db_commit();
217217}
218218
219219function activity_get_viewaccess_users($view, $owner, $type) {