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

Axum API scaffolding #175

Merged
merged 3 commits into from
Jun 8, 2023
Merged

Axum API scaffolding #175

merged 3 commits into from
Jun 8, 2023

Conversation

josecelano
Copy link
Member

@josecelano josecelano commented Jun 6, 2023

Basic changes which are needed to run the Axum API implementation in parallel with the current one with ActixWeb. For the time being the Axum implementation will be only used for testing until all endpoints are migrated.

We decided to migrate from Actix Web to Axum. The main reason was we are
also using Axum on the Tracker and it will be easier for us to mantain
only one framework. And apparently there are no drawbacks.

This commit adds the new dependencies.
When the loggin level is set to INFO sqlx logs all SQL statements like
this:

```
2023-06-06T17:19:52.639651375+01:00 [sqlx::query][INFO] SELECT version FROM _sqlx_migrations …; rows affected: 0, rows returned: 0, elapsed: 58.361µs

SELECT
  version
FROM
  _sqlx_migrations
WHERE
  success = false
ORDER BY
  version
LIMIT
  1
```

This commits makes sqlc to log only failed statements as errors and slow
statements (>1 second) as warnings.
@josecelano josecelano linked an issue Jun 6, 2023 that may be closed by this pull request
Basic changes needed to run the Axum API implementation in parallel with the current one with ActixWeb.

For the time being, we will be only useinf the Auxm implementation for testing until all endpoints are migrated.
@josecelano josecelano marked this pull request as ready for review June 8, 2023 14:56
@josecelano josecelano merged commit a47c99b into torrust:develop Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Axum API: scaffolding
1 participant