Compare commits
2 Commits
987f201ed1
...
a47c66202b
Author | SHA1 | Date | |
---|---|---|---|
a47c66202b | |||
ec4122bdf3 |
@ -138,7 +138,7 @@ if (run_env.from_code) {
|
||||
// const input_path = path.join(__dirname, "input.txt");
|
||||
// 从 cli 参数里读取
|
||||
const input_path = run_env.cli_args[2];
|
||||
logger.debug("input_path", input_path);
|
||||
logger.info("input_path", input_path);
|
||||
const input_data = fs.readFileSync(input_path, "utf-8");
|
||||
global.name_input = input_data;
|
||||
|
||||
@ -251,6 +251,8 @@ if (run_env.from_code) {
|
||||
assets_data.gAd = gAd_data;
|
||||
}
|
||||
|
||||
console.log("run env", run_env);
|
||||
|
||||
let why_ns = 0;
|
||||
|
||||
function copyProperties(a, b) {
|
||||
|
@ -38,10 +38,11 @@ def on_ica_message(msg: IcaNewMessage, client: IcaClient) -> None:
|
||||
input_path = root_path / "md5" / "input.txt"
|
||||
result = subprocess.run(["node", runner_path.absolute(), input_path.absolute()], stdout=subprocess.PIPE)
|
||||
# 获取结果
|
||||
result = result.stdout.decode("utf-8")
|
||||
out_result = result.stdout.decode("utf-8")
|
||||
err_result = result.stderr.decode("utf-8")
|
||||
# 发送结果
|
||||
end_time = time.time()
|
||||
reply = msg.reply_with(f"{result}\n耗时:{end_time - start_time:.2f}s\n版本:{_version_}")
|
||||
reply = msg.reply_with(f"{out_result}\n{err_result}\n耗时:{end_time - start_time:.2f}s\n版本:{_version_}")
|
||||
client.send_message(reply)
|
||||
except Exception as e:
|
||||
# 发送错误
|
||||
|
Loading…
Reference in New Issue
Block a user