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)
Sun, Aug 14, 2:02 PM
Unknown Object (File)
Sat, Aug 13, 1:13 PM
Unknown Object (File)
Fri, Aug 12, 8:47 PM
Unknown Object (File)
Wed, Aug 10, 10:55 AM
Unknown Object (File)
Mon, Jul 18, 7:30 AM
Unknown Object (File)
Mon, Jul 18, 7:30 AM
Unknown Object (File)
Jul 13 2022, 8:14 AM
Unknown Object (File)
Jul 12 2022, 3:01 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).