Page MenuHomePhabricator

Separate repository updates from the pull daemon
ClosedPublic

Authored by epriestley on Apr 15 2014, 11:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 9:50 AM
Unknown Object (File)
Sun, Dec 8, 5:59 AM
Unknown Object (File)
Wed, Dec 4, 10:15 PM
Unknown Object (File)
Wed, Dec 4, 12:36 PM
Unknown Object (File)
Fri, Nov 29, 9:27 PM
Unknown Object (File)
Tue, Nov 26, 12:40 PM
Unknown Object (File)
Nov 18 2024, 4:17 AM
Unknown Object (File)
Nov 13 2024, 10:17 PM
Subscribers

Details

Summary

Ref T4605. Currently, the PullLocal daemon is responsible for two relatively distinct things:

  • scheduling repository updates; and
  • actually updating repositories.

Move the "actually updating" part into a new bin/repository update command, which basically runs the pull, discover, refs and mirror commands. This will let the parent process focus on scheduling in a more understandable way and update multiple repositories at once. It also makes it easier to debug and understand update behavior since the non-scheduling pipeline can be run separately.

Test Plan
  • Ran update --trace on SVN, Mercurial and Git repos.
  • Ran PullLocal daemon for a while without issues.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Separate repository updates from the pull daemon.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.

Nice re-factor. If the answer to my inline question is "no" can we change the phlog to log to the daemon console?

src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
140

this ends up showing up in the daemon log?

This revision is now accepted and ready to land.Apr 16 2014, 6:10 PM
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
140

Yeah, phlog() from daemons goes to the console (or, if it doesn't, that's a bug). I'll double-check.

Here's a screenshot of it hitting the daemon logs under real-world conditions:

Screen_Shot_2014-04-16_at_11.13.30_AM.png (344×1 px, 102 KB)

epriestley updated this revision to Diff 20857.

Closed by commit rP118c696f727a (authored by @epriestley).