1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/src/applications
epriestley a9ceebbdb1 Move all ApplicationTransaction publishing to daemons
Summary:
Ref T6367. Do all mail, feed, notification and search stuff from the daemons, in all editors.

There are four relatively-stateful editors (Audit, Differential, Phriction, PhortuneCart) which needed special care to move state into the daemons properly.

Beyond that, I moved mailTo/mailCC/feedRelated/feedNotify to be computed before we enter the worker:

  - This is simpler, since a lot of editors rely on being able to call `$object->getReviewers()` or similar to compute them.
  - This is more correct, since we want to freeze the lists at this moment in time.

Finally, I renamed `loadEdges` to `willPublish` and made it a slightly more general hook.

---

This is a bit fragile and I'm not //thrilled// about it.

It would probably be cleaner to have separate Editor and Publisher classes (something like @fabe's D11329 did). However, I think that's quite a lot of work, and I'd like to see stronger motivation for it (either in this actually being more fragile than I think, or there being other things we get out of it). Overall, I'm comfortable with this change, just definitely not a big fan of the "save" + "load" pattern since I think it's really fragile, nonobvious, hard to debug/predict, etc.

Test Plan:
Directly updated editors:

- Created a new Phriction page, saw "Document Content".
- Edited a Phriction page, saw "Document Diff".
- Edited a revision, got normal looking mail.
- Faked in `changedPriorToCommitURI` and verified it survived the state boundary.
- Sent Audit mail.
- Sent invoice mail.

Indirect editors - for these, I just made a change and made sure the mail generated:

- Updated a paste.
- Updated an event.
- Updated a thread.
- Updated a task.
- Updated a mock.
- Updated a question.
- Updated a project.
- Updated a file.
- Updated an initiative.
- Updated a Legalpad document.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley, fabe

Maniphest Tasks: T6367

Differential Revision: https://secure.phabricator.com/D13115
2015-06-03 18:59:29 -07:00
..
almanac Fix an issue with AlamancDeviceEditor 2015-06-03 18:41:21 -07:00
aphlict Linter fixes 2015-06-02 22:14:01 +10:00
arcanist/conduit Mark "arcanist.projectinfo" as deprecated 2015-05-25 22:52:41 +10:00
audit Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
auth Add "Mailing List" users 2015-06-03 18:42:33 -07:00
base Linter fixes 2015-06-02 22:14:01 +10:00
cache phtize all the things 2015-05-22 21:16:39 +10:00
calendar Attempt to optimize ghost generating code. 2015-06-03 13:01:26 -07:00
celerity Digest resource cachekeys to maximum length 2015-06-01 09:04:22 -07:00
chatlog phtize all the things 2015-05-22 21:16:39 +10:00
conduit Add "Mailing List" users 2015-06-03 18:42:33 -07:00
config Update account roles documentation and remove actAsUser 2015-06-03 18:42:09 -07:00
conpherence Conpherence - massage email notification to have proper link to how to update email settings 2015-05-28 15:30:33 -07:00
console Make everything 1000x or 1000000x slower 2015-05-23 05:36:02 -07:00
countdown phtize all the things 2015-05-22 21:16:39 +10:00
daemon Linter fixes 2015-06-02 22:14:01 +10:00
dashboard phtize all the things 2015-05-22 21:16:39 +10:00
differential Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
diffusion Add "Mailing List" users 2015-06-03 18:42:33 -07:00
diviner Linter fixes 2015-06-02 22:14:01 +10:00
doorkeeper phtize all the things 2015-05-22 21:16:39 +10:00
draft/storage Fix visiblity of LiskDAO::getConfiguration() 2015-01-14 06:54:13 +11:00
drydock Linter fixes 2015-06-02 22:14:01 +10:00
fact phtize all the things 2015-05-22 21:16:39 +10:00
feed phtize all the things 2015-05-22 21:16:39 +10:00
files phtize all the things 2015-05-22 21:16:39 +10:00
flag phtize all the things 2015-05-22 21:16:39 +10:00
fund phtize all the things 2015-05-22 21:16:39 +10:00
harbormaster Linter fixes 2015-06-02 22:14:01 +10:00
help Use __CLASS__ instead of hard-coding class names 2015-05-14 07:21:13 +10:00
herald Linter fixes 2015-06-02 22:14:01 +10:00
home phtize all the things 2015-05-22 21:16:39 +10:00
legalpad phtize all the things 2015-05-22 21:16:39 +10:00
lipsum phtize all the things 2015-05-22 21:16:39 +10:00
macro phtize all the things 2015-05-22 21:16:39 +10:00
mailinglists/storage Put PhabricatorMetaMTAMailingList back to keep bin/storage adjust happy for now 2015-06-03 18:51:40 -07:00
maniphest Linter fixes 2015-06-02 22:14:01 +10:00
meta phtize all the things 2015-05-22 21:16:39 +10:00
metamta Remove mailing lists application 2015-06-03 18:42:36 -07:00
multimeter Use PhutilInvalidStateException 2015-05-14 07:53:52 +10:00
notification Linter fixes 2015-06-02 22:14:01 +10:00
nuance phtize all the things 2015-05-22 21:16:39 +10:00
oauthserver Linter fixes 2015-06-02 22:14:01 +10:00
owners Convert Owners paths to application transactions 2015-05-27 10:30:26 -07:00
passphrase phtize all the things 2015-05-22 21:16:39 +10:00
paste Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
people Add "Mailing List" users 2015-06-03 18:42:33 -07:00
phame Linter fixes 2015-06-02 22:14:01 +10:00
phid Remove mailing lists application 2015-06-03 18:42:36 -07:00
phlux Transactions - make implementing TYPE_XXXX_POLICY transactions optional 2015-05-19 12:58:18 -07:00
pholio phtize all the things 2015-05-22 21:16:39 +10:00
phortune Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
phpast phtize all the things 2015-05-22 21:16:39 +10:00
phragment phtize all the things 2015-05-22 21:16:39 +10:00
phrequent phtize all the things 2015-05-22 21:16:39 +10:00
phriction Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
policy Add support for "Extended Policies" 2015-06-03 18:59:27 -07:00
ponder phtize all the things 2015-05-22 21:16:39 +10:00
project Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
releeph Linter fixes 2015-06-02 22:14:01 +10:00
remarkup/conduit phtize all the things 2015-05-22 21:16:39 +10:00
repository Remove the repositories application 2015-06-01 15:37:13 +10:00
search Remove mailing lists application 2015-06-03 18:42:36 -07:00
settings Allow administrators to configure "Email Settings" settings for lists 2015-06-03 18:42:41 -07:00
slowvote phtize all the things 2015-05-22 21:16:39 +10:00
spaces Fix some minor Spaces method visibility issues 2015-06-03 18:42:38 -07:00
subscriptions phtize all the things 2015-05-22 21:16:39 +10:00
support/application Implement the getName method in PhabricatorApplication subclasses 2014-07-23 23:52:50 +10:00
system Remove flags and tokens upon object destruction 2015-06-04 07:23:48 +10:00
tokens phtize all the things 2015-05-22 21:16:39 +10:00
transactions Move all ApplicationTransaction publishing to daemons 2015-06-03 18:59:29 -07:00
typeahead phtize all the things 2015-05-22 21:16:39 +10:00
uiexample phtize all the things 2015-05-22 21:16:39 +10:00
xhprof phtize all the things 2015-05-22 21:16:39 +10:00