|
14 | 14 | //!
|
15 | 15 | //! That command would upload 1000 random torrents to the Index using the user
|
16 | 16 | //! account admin with password 123456 and waiting 1 second between uploads.
|
17 |
| -use std::{thread::sleep, time::Duration}; |
| 17 | +use std::thread::sleep; |
| 18 | +use std::time::Duration; |
18 | 19 |
|
19 | 20 | use anyhow::Context;
|
20 | 21 | use clap::Parser;
|
21 | 22 | use log::{debug, info, LevelFilter};
|
22 | 23 | use text_colorizer::Colorize;
|
23 | 24 | use uuid::Uuid;
|
24 | 25 |
|
25 |
| -use crate::{ |
26 |
| - console::commands::seeder::{ |
27 |
| - api::{login, upload_torrent}, |
28 |
| - logging, |
29 |
| - }, |
30 |
| - services::torrent_file::generate_random_torrent, |
31 |
| - utils::parse_torrent, |
32 |
| - web::api::client::v1::{ |
33 |
| - client::Client, |
34 |
| - contexts::{ |
35 |
| - torrent::{ |
36 |
| - forms::{BinaryFile, UploadTorrentMultipartForm}, |
37 |
| - responses::UploadedTorrent, |
38 |
| - }, |
39 |
| - user::responses::LoggedInUserData, |
40 |
| - }, |
41 |
| - }, |
42 |
| -}; |
43 |
| - |
44 | 26 | use super::api::Error;
|
| 27 | +use crate::console::commands::seeder::api::{login, upload_torrent}; |
| 28 | +use crate::console::commands::seeder::logging; |
| 29 | +use crate::services::torrent_file::generate_random_torrent; |
| 30 | +use crate::utils::parse_torrent; |
| 31 | +use crate::web::api::client::v1::client::Client; |
| 32 | +use crate::web::api::client::v1::contexts::torrent::forms::{BinaryFile, UploadTorrentMultipartForm}; |
| 33 | +use crate::web::api::client::v1::contexts::torrent::responses::UploadedTorrent; |
| 34 | +use crate::web::api::client::v1::contexts::user::responses::LoggedInUserData; |
45 | 35 |
|
46 | 36 | #[derive(Parser, Debug)]
|
47 | 37 | #[clap(author, version, about, long_about = None)]
|
|
0 commit comments