mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-21 11:09:02 +01:00
Allow CommitTask daemon to recover from deleted repositories
Summary: If a user partially discovers a repository and then deletes it, the timeline will have events from the old repository which this daemon won't be able to parse. Test Plan: @ajtrichards, can you apply this locally and restart your daemons (##phd stop##, then relaunch them) and let me know if it fixes the issue? Reviewers: ajtrichards, jungejason, tuomaspelkonen, aran Reviewed By: ajtrichards CC: aran, epriestley, ajtrichards Differential Revision: 845
This commit is contained in:
parent
3dbe60b388
commit
6cae153569
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ class PhabricatorRepositoryCommitTaskDaemon
|
||||||
// TODO: Cache these.
|
// TODO: Cache these.
|
||||||
$repository = id(new PhabricatorRepository())->load(
|
$repository = id(new PhabricatorRepository())->load(
|
||||||
$commit->getRepositoryID());
|
$commit->getRepositoryID());
|
||||||
|
if (!$repository) {
|
||||||
|
// TODO: As above, although this almost certainly means the user just
|
||||||
|
// deleted the repository and we're correct to ignore the event in
|
||||||
|
// the timeline.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$vcs = $repository->getVersionControlSystem();
|
$vcs = $repository->getVersionControlSystem();
|
||||||
switch ($vcs) {
|
switch ($vcs) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue