diff --git a/autopush_rs/src/client.rs b/autopush_rs/src/client.rs index 460af532..b689c035 100644 --- a/autopush_rs/src/client.rs +++ b/autopush_rs/src/client.rs @@ -585,7 +585,7 @@ where #[state_machine_future(transitions(DetermineAck))] AwaitMigrateUser { - response: MyFuture, + response: MyFuture<()>, data: AuthClientData, }, @@ -947,11 +947,11 @@ where await_migrate_user: &'a mut RentToOwn<'a, AwaitMigrateUser>, ) -> Poll, Error> { debug!("State: AwaitMigrateUser"); - let message_month = try_ready!(await_migrate_user.response.poll()); + try_ready!(await_migrate_user.response.poll()); let AwaitMigrateUser { data, .. } = await_migrate_user.take(); { let mut webpush = data.webpush.borrow_mut(); - webpush.message_month = message_month; + webpush.message_month = data.srv.opts.current_message_month.clone(); webpush.flags.rotate_message_table = false; } transition!(DetermineAck { data }) diff --git a/autopush_rs/src/util/ddb_helpers.rs b/autopush_rs/src/util/ddb_helpers.rs index ce4599b6..51e75582 100644 --- a/autopush_rs/src/util/ddb_helpers.rs +++ b/autopush_rs/src/util/ddb_helpers.rs @@ -1005,7 +1005,7 @@ impl DynamoStorage { message_month: &str, current_message_month: &str, router_table_name: &str, - ) -> MyFuture { + ) -> MyFuture<()> { let ddb = self.ddb.clone(); let ddb1 = self.ddb.clone(); let ddb2 = self.ddb.clone(); @@ -1013,7 +1013,6 @@ impl DynamoStorage { let cur_month = current_message_month.to_string(); let cur_month1 = cur_month.clone(); let cur_month2 = cur_month.clone(); - let cur_month3 = cur_month.clone(); let router_table_name = router_table_name.to_string(); let response = DynamoStorage::all_channels(ddb, &uaid, message_month) .and_then(move |channels| -> MyFuture<_> { @@ -1031,7 +1030,7 @@ impl DynamoStorage { &cur_month2, ) }) - .and_then(move |_| -> MyFuture<_> { Box::new(future::ok(cur_month3)) }) + .and_then(move |_| -> MyFuture<_> { Box::new(future::ok(())) }) .chain_err(|| "Unable to migrate user"); Box::new(response) }