Style
This commit is contained in:
parent
b53267f406
commit
da98bfba8c
20 changed files with 80 additions and 61 deletions
|
|
@ -34,8 +34,8 @@ impl<'a, N, C: CommandRunner, S> Dump<'a, N, C, S> {
|
|||
impl<N: AsRef<str>, C: CommandRunner, S: Storage> Symbol for Dump<'_, N, C, S> {
|
||||
async fn target_reached(&self) -> Result<bool, Box<dyn Error>> {
|
||||
let dump_date = self.storage.recent_date()?;
|
||||
let _modified_date = self.run_sql(&format!("select UNIX_TIMESTAMP(MAX(UPDATE_TIME)) from information_schema.tables WHERE table_schema = '{}'", self.db_name.as_ref())).await?;
|
||||
let modified_date = _modified_date.trim_end();
|
||||
let output = self.run_sql(&format!("select UNIX_TIMESTAMP(MAX(UPDATE_TIME)) from information_schema.tables WHERE table_schema = '{}'", self.db_name.as_ref())).await?;
|
||||
let modified_date = output.trim_end();
|
||||
Ok(modified_date != "NULL" && u64::from_str(modified_date)? <= dump_date)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue