Merge branch 'master' into watch_channel

This commit is contained in:
Daniel Sockwell 2020-04-08 18:51:59 -04:00
commit f7780f55e5
4 changed files with 6 additions and 3 deletions

View File

@ -48,3 +48,4 @@ production = []
#codegen-units = 1

View File

@ -45,9 +45,9 @@ Flóðgátt is tested against the [default Mastodon nginx config](https://github
### Advanced Configuration
The streaming server will eventually uses the same environment variables as the rest of Mastodon,
The streaming server will eventually use the same environment variables as the rest of Mastodon,
and currently uses a subset of those variables. Supported variables are listed in
`/src/config.rs`. Supported environmental variables either be passed to Flóðgátt at runtime or
`/src/config.rs`. You can provide any supported environmental variable to Flóðgátt at runtime or
through a `.env` file.
Note that the default values for the `postgres` connection do not correspond to those typically

View File

@ -118,7 +118,7 @@ impl EventStream {
}
})
// event_rx
// _rx
// .take_while(move |(tl, event)| {
// let (tl, event) = (*tl, event.clone());
// if target_timeline == tl {

View File

@ -38,6 +38,7 @@ pub struct Receiver {
impl Receiver {
/// Create a new `Receiver`, with its own Redis connections (but, as yet, no
/// active subscriptions).
pub fn try_from(
redis_cfg: config::RedisConfig,
tx: watch::Sender<(Timeline, Event)>,
@ -45,6 +46,7 @@ impl Receiver {
) -> Result<Self> {
Ok(Self {
redis_connection: RedisConn::new(redis_cfg)?,
clients_per_timeline: HashMap::new(),
tx,
rx,