mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
4ef918e213
Summary: Phabricator generates a bunch of data that we don't need to keep around forever, add a GC daemon to get rid of it with some basic configuration options. This needs a couple more diffs to get some of the details but I think this is a reasonable start. I also fixed a couple of UI things related to this, e.g. the daemon logs page going crazy when a daemon gets stuck in a loop and dumps tons of data to stdout. Test Plan: - Ran gc daemon in 'phd debug' mode and saw it delete stuff, then sleep once it had cleaned everything up. - Mucked around with TTLs and verified they work correctly. - Viewed gc'd transcripts in the web interface and made sure they displayed okay. - Viewed daemon logs before/after garbage collection. - Running some run-at / run-for tests now, I'll update if the daemon doesn't shut off in ~10-15 minutes. :P Reviewed By: tuomaspelkonen Reviewers: jungejason, tuomaspelkonen, aran CC: aran, tuomaspelkonen, epriestley Differential Revision: 583
63 lines
2 KiB
Bash
Executable file
63 lines
2 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
set -x
|
|
|
|
# This is an example script for updating Phabricator, similar to the one used to
|
|
# update <https://secure.phabricator.com/>. It might not work perfectly on your
|
|
# system, but hopefully it should be easy to adapt.
|
|
|
|
# NOTE: This script assumes you are running it from a directory which contains
|
|
# arcanist/, libphutil/, phabricator/, and possibly diviner/.
|
|
|
|
ROOT=`pwd` # You can hard-code the path here instead.
|
|
|
|
|
|
### UPDATE WORKING COPIES ######################################################
|
|
|
|
if [ -e $ROOT/diviner ]
|
|
then
|
|
(cd $ROOT/diviner && git pull)
|
|
fi
|
|
|
|
(cd $ROOT/libphutil && git pull)
|
|
(cd $ROOT/arcanist && git pull)
|
|
(cd $ROOT/phabricator && git pull && git submodule update --init)
|
|
|
|
|
|
### GENERATE DOCUMENTATION #####################################################
|
|
|
|
# This generates documentation if you have diviner/ checked out. You generally
|
|
# don't need to do this unless you're contributing to Phabricator and want to
|
|
# preview some of the amazing documentation you've just written.
|
|
if [ -e $ROOT/diviner ]
|
|
then
|
|
(cd $ROOT/diviner && $ROOT/diviner/bin/diviner .)
|
|
(cd $ROOT/libphutil && $ROOT/diviner/bin/diviner .)
|
|
(cd $ROOT/arcanist && $ROOT/diviner/bin/diviner .)
|
|
(cd $ROOT/phabricator && $ROOT/diviner/bin/diviner .)
|
|
fi
|
|
|
|
### CYCLE APACHE AND DAEMONS ###################################################
|
|
|
|
# Stop Apache. Depening on what system you're running, you may need to use
|
|
# 'apachectl' or something else to cycle apache.
|
|
sudo /etc/init.d/httpd stop
|
|
|
|
# Stop daemons.
|
|
$ROOT/phabricator/bin/phd stop
|
|
|
|
# Upgrade the database schema.
|
|
$ROOT/phabricator/scripts/sql/upgrade_schema.php -f
|
|
|
|
# Restart apache.
|
|
sudo /etc/init.d/httpd start
|
|
|
|
# Restart daemons. Customize this to start whatever daemons you're running on
|
|
# your system.
|
|
|
|
# $ROOT/phabricator/bin/phd repository-launch-master
|
|
# $ROOT/phabricator/bin/phd launch metamta
|
|
# $ROOT/phabricator/bin/phd launch garbagecollector
|
|
# $ROOT/phabricator/bin/phd launch 4 taskmaster
|
|
# $ROOT/phabricator/bin/phd launch ircbot /config/bot.json
|