Mercurial > piecrust2
diff foodtruck/views/publish.py @ 613:e2e955a3bb25
publish: Add publish command.
* Add `shell` publisher.
* Refactor admin panel's publishing backend to use that, along with the new
PID file support.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 04 Feb 2016 08:05:03 -0800 |
parents | efc1dc916e7c |
children | 40e897e2f11e |
line wrap: on
line diff
--- a/foodtruck/views/publish.py Thu Feb 04 08:03:52 2016 -0800 +++ b/foodtruck/views/publish.py Thu Feb 04 08:05:03 2016 -0800 @@ -1,5 +1,3 @@ -import os -import os.path import copy import logging from flask import request, g, url_for, render_template, Response @@ -49,9 +47,8 @@ @app.route('/publish-log') @login_required def stream_publish_log(): - site = g.site - pid_path = os.path.join(site.root_dir, '.ft_pub.pid') - log_path = os.path.join(site.root_dir, '.ft_pub.log') + pid_path = g.site.publish_pid_file + log_path = g.site.publish_log_file rdr = PublishLogReader(pid_path, log_path) response = Response(rdr.run(), mimetype='text/event-stream')