Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
xVanTuring authored and xVanTuring committed Jun 2, 2020
1 parent 9f2c94d commit 0a021cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let pythonSSRInstance
* 运行shell命令并写入到日志中
* @param {string[]} params 待执行的shell命令
*/
function runPythonSSR(params) {
function runPythonSSR (params) {
let command = pythonName
const commandStr = `${command} ${params.join(' ')}`
logger.info('run command: %s', commandStr.replace(/-k [\d\w]* /, '-k ****** '))
Expand Down Expand Up @@ -71,7 +71,7 @@ function runPythonSSR(params) {
* 运行ssr
* @param {Object} appConfig ssr配置
*/
export async function run(appConfig) {
export async function run (appConfig) {
const listenHost = appConfig.shareOverLan ? '0.0.0.0' : '127.0.0.1'
// 先结束之前的
await stop()
Expand Down Expand Up @@ -123,7 +123,7 @@ export async function run(appConfig) {
* 结束command的后台运行
* @returns {Promise<void>}
*/
export function stop(force = false) {
export function stop (force = false) {
if (pythonSSRInstance && !pythonSSRInstance.killed) {
logger.log('Kill client')
return new Promise((resolve) => {
Expand Down Expand Up @@ -157,7 +157,7 @@ export function stop(force = false) {
* 根据配置运行SSR命令
* @param {Object} appConfig 应用配置
*/
export function runWithConfig(appConfig) {
export function runWithConfig (appConfig) {
if (appConfig.ssrPath && appConfig.enable && appConfig.configs && appConfig.index >= 0 && appConfig.configs[appConfig.index]) {
run(appConfig)
}
Expand Down

0 comments on commit 0a021cf

Please sign in to comment.