extract DbConn from PlumeRocket #805

Slēgta
igalic vēlas sapludināt 2 revīzijas no igalic/Plume:refactor/extract-dbconn uz main
igalic " komentēja pirms 4 gadiem"
Īpašnieks

in the following Pull Request, we'lle extract DbConn from PlumeRocket, as suggested in #797

  • use rocket_contrib's #[database] to implement our DbConn
  • we do not use #[database]'s connection setup, retaining our own init_pool() and ConnectionCustomization!
  • pass DbConn in as ref instead of Copying it around.
in the following Pull Request, we'lle extract `DbConn` from `PlumeRocket`, as suggested in https://git.joinplu.me/Plume/Plume/issues/797 - use rocket_contrib's `#[database]` to implement our `DbConn` - we do *not* use `#[database]`'s connection setup, retaining our own `init_pool()` and `ConnectionCustomization`! - pass `DbConn` in as `ref` instead of `Copy`ing it around.
kiwii recenzēja pirms 4 gadiem
@ -41,3 +12,1 @@
&self.0
}
}
#[database("plume")]
kiwii " komentēja pirms 4 gadiem"
Īpašnieks

I think you'll have to edit plume-models/src/config.rs so that Rocket knows the URL of this "plume" database.

I think you'll have to edit `plume-models/src/config.rs` so that Rocket knows the URL of this "plume" database.
igalic " komentēja pirms 4 gadiem"
Autors
Īpašnieks

yesno… we want to retain our ConnectionCustomization, so we're keeping our own init_pool().

yesno… we want to retain our `ConnectionCustomization`, so we're keeping our own `init_pool()`.
igalic atzīmēja sarunu kā atrisinātu
igalic veica piespiedu izmaiņu iesūtīšanu atzarā refactor/extract-dbconn no revīzijas 9c7af7dcd4 uz 3d8785e97b pirms 4 gadiem
igalic nomainīts nosaukums no add rocket_contrib as dependency uz extract DbConn from PlumeRocket pirms 4 gadiem
igalic " komentēja pirms 4 gadiem"
Autors
Īpašnieks
  • pass DbConn in as ref instead of Copying it around.

This will help with the async migration, as we're currently passing all of PlumeRocket around as ref, which means that it ends up sitting somewhere in a function, until it's .awaited.

This can create lead us into a big mess, which may be impossible to untangle, so this should help not running into that to begin with.

> - pass `DbConn` in as `ref` instead of `Copy`ing it around. This will help with the `async` migration, as we're currently passing all of PlumeRocket around as `ref`, which means that it ends up sitting *somewhere* in a function, until it's `.await`ed. This can create lead us into a big mess, which may be impossible to untangle, so this should help *not* running into that to begin with.
igalic iesūtīja 1 revīziju pirms 4 gadiem
e19069f750
remove DbConn from PlumeRocket
this means compilation fails, and for the next while, we'll try to make
it compile again ;)
igalic " komentēja pirms 4 gadiem"
Autors
Īpašnieks

closing in favour of #813

closing in favour of #813
igalic aizvēra šo izmaiņu pieprasījumu pirms 4 gadiem
Atkārtoti atveriet izmaiņu pieprasījumu, lai veiktu sapludināšanu.
Pierakstieties, lai pievienotos šai sarunai.
Nav recenzentu
Nav atskaites punktu
Nav atbildīgo
2 dalībnieki
Paziņojumi
Izpildes termiņš
Datums līdz nav korekts. Izmantojiet formātu 'gggg-mm-dd'.

Izpildes termiņš nav uzstādīts.

Atkarības

Nav atkarību.

Atsaucas uz: Plume/Plume#805
Notiek ielāde…
Vēl nav satura.