ActivityImporter catches thrown exceptions by plugins and marks entry done

This commit is contained in:
Evan Prodromou 2011-05-30 09:57:49 -04:00
parent 97debbab68
commit 9167ba8d2d

View File

@ -63,9 +63,9 @@ class ActivityImporter extends QueueHandler
$done = null; $done = null;
try {
if (Event::handle('StartImportActivity', if (Event::handle('StartImportActivity',
array($user, $author, $activity, $trusted, &$done))) { array($user, $author, $activity, $trusted, &$done))) {
try {
switch ($activity->verb) { switch ($activity->verb) {
case ActivityVerb::FOLLOW: case ActivityVerb::FOLLOW:
$this->subscribeProfile($user, $author, $activity); $this->subscribeProfile($user, $author, $activity);
@ -83,11 +83,11 @@ class ActivityImporter extends QueueHandler
Event::handle('EndImportActivity', Event::handle('EndImportActivity',
array($user, $author, $activity, $trusted)); array($user, $author, $activity, $trusted));
$done = true; $done = true;
}
} catch (Exception $e) { } catch (Exception $e) {
common_log(LOG_ERR, $e->getMessage()); common_log(LOG_ERR, $e->getMessage());
$done = true; $done = true;
} }
}
return $done; return $done;
} }