mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-19 14:41:09 +00:00
Fix iplocate cerificates (#283)
This commit is contained in:
@@ -19,6 +19,7 @@ LABEL description="Polkadot Telemetry backend, static build"
|
|||||||
ARG PROFILE=release
|
ARG PROFILE=release
|
||||||
WORKDIR /usr/local/bin
|
WORKDIR /usr/local/bin
|
||||||
|
|
||||||
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||||
COPY --from=builder /app/target/x86_64-unknown-linux-musl/$PROFILE/telemetry /usr/local/bin
|
COPY --from=builder /app/target/x86_64-unknown-linux-musl/$PROFILE/telemetry /usr/local/bin
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ impl Actor for NodeConnector {
|
|||||||
|
|
||||||
impl NodeConnector {
|
impl NodeConnector {
|
||||||
pub fn new(aggregator: Addr<Aggregator>, locator: Recipient<LocateRequest>, ip: Option<Ipv4Addr>) -> Self {
|
pub fn new(aggregator: Addr<Aggregator>, locator: Recipient<LocateRequest>, ip: Option<Ipv4Addr>) -> Self {
|
||||||
info!("Node connected: {:?}", ip);
|
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
// Garbage id, will be replaced by the Initialize message
|
// Garbage id, will be replaced by the Initialize message
|
||||||
nid: !0,
|
nid: !0,
|
||||||
|
|||||||
@@ -136,16 +136,7 @@ impl Locator {
|
|||||||
where
|
where
|
||||||
for<'de> T: Deserialize<'de>,
|
for<'de> T: Deserialize<'de>,
|
||||||
{
|
{
|
||||||
let mut result = match self.client.get(url).send() {
|
match self.client.get(url).send()?.json::<T>() {
|
||||||
Ok(result) => result,
|
|
||||||
Err(error) => {
|
|
||||||
info!("Failed query {} ({:?})", url, error);
|
|
||||||
|
|
||||||
return Err(error);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
match result.json::<T>() {
|
|
||||||
Ok(result) => Ok(Some(result)),
|
Ok(result) => Ok(Some(result)),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
debug!("JSON error for ip location: {:?}", err);
|
debug!("JSON error for ip location: {:?}", err);
|
||||||
|
|||||||
Reference in New Issue
Block a user