This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Response: | |
def __init__(self, content: dict, status: int): | |
self.content = content | |
self.status = status | |
def make_request(content: dict, status: int) -> Response: | |
return Response(content, status) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Backoff policy for agile retrying with increasing delay | |
""" | |
import asyncio | |
import logging | |
from typing import Awaitable, Callable | |
logger = logging.getLogger(__name__) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use anyhow::Result; | |
use redis::Commands; | |
use serde::{Deserialize, Serialize}; | |
use std::fmt; | |
use std::fmt::Formatter; | |
use std::str::FromStr; | |
const COORDINATE_PRECISION: usize = 4; | |
const CACHE_TTL: usize = 2628000; |
OlderNewer