Skip to content

influx: Backup to file #34

Description

@BlakeFreer

From lib/rust/influx/src/lib.rs

tracing::debug!("Making Influx request");
let response = request.send().await;

match response {
    Ok(r) => tracing::debug!(response=?r, "Received Influx response"),
    Err(e) => tracing::error!(err = ?e, "Failed to write to DB"),
}

batch.clear();

If response is Err (database request fails), the queries are dropped. Instead, they should be saved to a local file and pushed once the connection is live

There is an unused backup_file on the Logger object already. Use it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions