Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New console command: random seeder #458

Merged
merged 7 commits into from
Feb 6, 2024

Commits on Feb 6, 2024

  1. refactor: [torrust#453] reorganize console mods

    ```console
    src/console/
    ├── commands
    │   ├── mod.rs
    │   └── tracker_statistics_importer
    │       ├── app.rs
    │       └── mod.rs
    ├── cronjobs
    │   ├── mod.rs
    │   └── tracker_statistics_importer.rs
    └── mod.rs
    ```
    
    - We will create a new command to seed the Index with random torrents.
    - This new strcuture is similar to what we have in the Tracker.
    josecelano committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    b1df4e8 View commit details
    Browse the repository at this point in the history
  2. refactor: [torrust#453] reorganize web mod

    Added `server` subfolder. We will add a client folder.
    josecelano committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    118d6a5 View commit details
    Browse the repository at this point in the history
  3. feat: [torrust#452] move API client to production code

    It will be use in a new console command (seeder).
    josecelano committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    ac21c49 View commit details
    Browse the repository at this point in the history
  4. feat: [torrust#453] add cargo dependencies: clap, anyhow

    They will be used in console commands.
    josecelano committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    98fa40f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    df3a9be View commit details
    Browse the repository at this point in the history
  6. feat: [torrust#453] new console command

    New console command to upload torrent to the Index remotely by using the
    API client.
    
    ```console
    cargo run --bin seeder -- --api-base-url <API_BASE_URL> --number-of-torrents <NUMBER_OF_TORRENTS> --user <USER> --password <PASSWORD> --interval <INTERVAL>
    ```
    
    For example:
    
    ```console
    cargo run --bin seeder -- --api-base-url "localhost:3001" --number-of-torrents 1000 --user admin --password 12345678 --interval 0
    ```
    
    That command would upload 1000 random torrents to the Index using the user
    account `admin` with password `123456` and waiting `1` second between uploads.
    josecelano committed Feb 6, 2024
    Configuration menu
    Copy the full SHA
    935facb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    324fac7 View commit details
    Browse the repository at this point in the history