wrap-job: Don't cd into r2/r2/ when we just want to be in r2/.

This was causing Pygments to fail to import correctly in jobs since
r2/r2/ has a commands.py which was getting relatively imported by
accident. Yuck.
This commit is contained in:
Neil Williams
2013-02-13 11:48:47 -08:00
parent 775c795894
commit 77efa9ab43

View File

@@ -16,8 +16,7 @@ REDDIT_GROUP
REDDIT_ROOT
The root directory of the reddit repo. Should contain
r2/, scripts/ etc.
The root directory of the reddit package. It's where the makefile lives.
REDDIT_LOG_FACILITY
@@ -45,9 +44,8 @@ os.setgid(gid)
os.setuid(uid)
# change directory to the reddit code root
root = os.environ.get("REDDIT_ROOT", "/opt/reddit/lib/public")
r2_root = os.path.join(root, "r2")
os.chdir(r2_root)
root = os.environ.get("REDDIT_ROOT", "/opt/reddit/lib/public/r2")
os.chdir(root)
# configure syslog
job_name = os.environ.get("UPSTART_JOB", "-".join(sys.argv[1:]))