Skip to content

Instantly share code, notes, and snippets.

View simanacci's full-sized avatar
💭
😷

simanacci

💭
😷
View GitHub Profile
@simanacci
simanacci / gist:4ce05a4a03d0b34a3db22423aec2a24c
Created February 3, 2024 08:39
Permission denied (publickey)
Run fifsky/ssh-action@master
with:
host: 65.123.123.133
user: sammy
key: ***
port: 22
command: cd ~
export SECRET=*** REDISRS_SERVER_TYPE=unix
docker-compose down
docker-compose pull
#[actix_web::test]
async fn units() -> anyhow::Result<()> {
std::env::set_var("RUST_LOG", "info");
std::env::set_var("RUST_BACKTRACE", "1");
dotenv::dotenv().ok();
let ctx = TestContext::new();
let meter = general::M1;
let gadget = fixtures::gadget(&ctx.client, meter, Uuid::new_v4()).await?;
pub async fn message<T>(
redis: &redis::Client,
sms: T,
gadget: Option<Uuid>,
uuid: Uuid,
) -> Result<Message, CustomError>
where
T: AsRef<str> + ToString,
{
if !helper::index_exists(redis, common::index::MESSAGES).await {