Skip to content

Commit

Permalink
Fixing final version to master branch, preparing for release v3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Power2All committed Aug 31, 2023
1 parent 2fc671d commit 8c190a1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ This will disable the maintenance mode.

### ChangeLog

#### v3.2.1
* Bumped library versions, including security patches.
* Fixed a bug in the PostgreSQL handler.
* Some forgotten naming from Torrust-Axum to Torrust-Actix.

#### v3.2.0
* Bumped library versions.
* Modified the way scheduling was done through threads, it could lock up and slow down public trackers with heavy activity.
Expand Down
5 changes: 2 additions & 3 deletions bin/pgsql_structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,13 @@ ALTER TABLE IF EXISTS public.keys
CREATE TABLE IF NOT EXISTS public.users
(
uuid bytea NOT NULL,
`key` bytea NOT NULL,
keyhash bytea NOT NULL,
uploaded bigint NOT NULL DEFAULT 0,
downloaded bigint NOT NULL DEFAULT 0,
completed bigint NOT NULL DEFAULT 0,
updated bigint NOT NULL DEFAULT 0,
active bigint NOT NULL DEFAULT 0,
CONSTRAINT users_puuid PRIMARY KEY (uuid),
CONSTRAINT users_pkey PRIMARY KEY (`key`)
CONSTRAINT users_puuid_keyhash PRIMARY KEY (uuid, keyhash)
)

TABLESPACE pg_default;
Expand Down
Binary file modified bin/torrust-actix_linux_x86_64
Binary file not shown.
Binary file modified bin/torrust-actix_windows_x86_64.exe
Binary file not shown.
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:alpine3.17
FROM rust:alpine3.18

ARG FULL_CONFIG=""
ENV FULL_CONFIG=$FULL_CONFIG
Expand Down Expand Up @@ -97,7 +97,7 @@ ENV USERS=$USERS

ARG DB_STRUCTURE_DB_USERS="users"
ARG DB_STRUCTURE_TABLE_USERS_UUID="uuid"
ARG DB_STRUCTURE_TABLE_USERS_KEY="key"
ARG DB_STRUCTURE_TABLE_USERS_KEY="keyhash"
ARG DB_STRUCTURE_TABLE_USERS_UPLOADED="uploaded"
ARG DB_STRUCTURE_TABLE_USERS_DOWNLOADED="downloaded"
ARG DB_STRUCTURE_TABLE_USERS_COMPLETED="completed"
Expand All @@ -107,7 +107,7 @@ ENV DB_STRUCTURE_DB_USERS=$DB_STRUCTURE_DB_USERS DB_STRUCTURE_TABLE_USERS_UUID=$

RUN apk add git musl-dev
RUN git clone https://github.com/Power2All/torrust-actix.git /root/torrust-actix
RUN cd /root/torrust-actix && git checkout tags/v3.2.0
RUN cd /root/torrust-actix && git checkout tags/v3.2.1
WORKDIR /root/torrust-actix
RUN cd /root/torrust-actix
RUN cargo build --release && rm -Rf target/release/.fingerprint target/release/build target/release/deps target/release/examples target/release/incremental
Expand Down
2 changes: 1 addition & 1 deletion src/database/postgresql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ impl DatabaseConnectorPgSQL {

let mut structure = DatabaseConnector { mysql: None, sqlite: None, pgsql: None, engine: None };
structure.pgsql = Some(DatabaseConnectorPgSQL { pool: pgsql_connect.unwrap() });
structure.engine = Some(DatabaseDrivers::mysql);
structure.engine = Some(DatabaseDrivers::pgsql);

structure
}
Expand Down
2 changes: 1 addition & 1 deletion src/databases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl DatabaseConnector {
if self.engine.is_some() {
return match self.engine.clone().unwrap() {
DatabaseDrivers::sqlite3 => { self.sqlite.clone().unwrap().load_blacklist(tracker.clone()).await }
DatabaseDrivers::mysql => { self.mysql.clone().unwrap().load_blacklist(tracker.clone()).await}
DatabaseDrivers::mysql => { self.mysql.clone().unwrap().load_blacklist(tracker.clone()).await }
DatabaseDrivers::pgsql => { self.pgsql.clone().unwrap().load_blacklist(tracker.clone()).await }
};
}
Expand Down

0 comments on commit 8c190a1

Please sign in to comment.