From a614e377edf403d40be228be2afcb6cdf71d38db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=8E=89=E5=9D=A1?= Date: Fri, 14 Sep 2018 15:46:29 +0800 Subject: [PATCH] =?UTF-8?q?U=20-=20=20=E9=80=9A=E7=94=A8=20-=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=91=E5=B8=83=E8=BF=87=E7=A8=8B=E4=B8=AD=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- spug_api/apps/assets/host.py | 1 - spug_api/libs/tools.py | 7 +++---- spug_web/webpack.config.js | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f7efcdf3..90582141 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ $ -e MYSQL_DATABASE="spug" //指定数据库名称 $ npm run dev 4. Visit 访问: - $ http://$HOST:8010 (http://你的主机IP:8080 来访问 Spug) + $ http://$HOST:8080 (http://你的主机IP:8080 来访问 Spug) ``` diff --git a/spug_api/apps/assets/host.py b/spug_api/apps/assets/host.py index 33123f0e..9e14949e 100644 --- a/spug_api/apps/assets/host.py +++ b/spug_api/apps/assets/host.py @@ -21,7 +21,6 @@ def get(): Argument('pagesize', type=int, default=10, required=False), Argument('host_query', type=dict, required=False), ).parse(request.args) if error is None: - print('host_ng', form) host_data = Host.query if form.page == -1: return json_response({'data': [x.to_json() for x in host_data.all()], 'total': -1}) diff --git a/spug_api/libs/tools.py b/spug_api/libs/tools.py index 4f775739..7feb45c9 100644 --- a/spug_api/libs/tools.py +++ b/spug_api/libs/tools.py @@ -217,10 +217,9 @@ def remove_queue(self, token=None): if q: q.destroy() return - for t, q in self._queues.items(): - if q.finished: - q.destroy() - self._queues.pop(t) + for t, q in [(t, q) for t, q in self._queues.items() if q.finished]: + q.destroy() + self._queues.pop(t) QueuePool = CommonQueue() diff --git a/spug_web/webpack.config.js b/spug_web/webpack.config.js index 5e3d6fbf..f28b63e3 100644 --- a/spug_web/webpack.config.js +++ b/spug_web/webpack.config.js @@ -78,8 +78,8 @@ module.exports = (options = {}) => ({ } }, devServer: { - host: '127.0.0.1', - port: 8010, + host: '0.0.0.0', + port: 8080, proxy: { '/api/': { target: config.apiServer,