load session id from file
This commit is contained in:
parent
f9fb1fb23c
commit
80e133c27a
@ -1,5 +1,6 @@
|
||||
use clap::{Args,Parser,Subcommand};
|
||||
use futures::{StreamExt,TryStreamExt};
|
||||
use std::path::PathBuf;
|
||||
|
||||
const READ_CONCURRENCY:usize=16;
|
||||
const REMOTE_CONCURRENCY:usize=16;
|
||||
@ -21,14 +22,14 @@ enum Commands{
|
||||
#[derive(Args)]
|
||||
struct ReviewCommand{
|
||||
#[arg(long)]
|
||||
session_id:String,
|
||||
session_id_file:PathBuf,
|
||||
#[arg(long)]
|
||||
api_url:String,
|
||||
}
|
||||
#[derive(Args)]
|
||||
struct UploadScriptsCommand{
|
||||
#[arg(long)]
|
||||
session_id:String,
|
||||
session_id_file:PathBuf,
|
||||
#[arg(long)]
|
||||
api_url:String,
|
||||
}
|
||||
@ -38,11 +39,11 @@ async fn main(){
|
||||
let cli=Cli::parse();
|
||||
match cli.command{
|
||||
Commands::Review(command)=>review(ReviewConfig{
|
||||
session_id:command.session_id,
|
||||
session_id:std::fs::read_to_string(command.session_id_file).unwrap(),
|
||||
api_url:command.api_url,
|
||||
}).await.unwrap(),
|
||||
Commands::UploadScripts(command)=>upload_scripts(UploadConfig{
|
||||
session_id:command.session_id,
|
||||
session_id:std::fs::read_to_string(command.session_id_file).unwrap(),
|
||||
api_url:command.api_url,
|
||||
}).await.unwrap(),
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user