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
# Redis 모니터링 시스템 개발 Task 문서 | |
## 📌 개요 | |
- 본 문서는 Redis 모니터링 시스템 구축을 위한 Task를 상세하게 나눈 작업 목록입니다. | |
- 각 Task는 상태, 의존성, 인수 테스트 조건을 포함합니다. | |
--- | |
## 🟧 A. 인증 및 보안 (AUTH) |
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
# 모니터링 시스템 | |
이 프로젝트는 FastAPI와 Celery를 사용한 모니터링 시스템입니다. | |
## 프로젝트 구조 | |
``` | |
. | |
├── app/ | |
│ ├── __init__.py |
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
from fastapi import FastAPI | |
import aioredis | |
app = FastAPI() | |
async def redis_pool(): | |
# Redis client bound to pool of connections (auto-reconnecting). | |
return aioredis.from_url( | |
"redis://localhost", encoding="utf-8", decode_responses=True | |
) |
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
import boto3 | |
import logging | |
logger = logging.getLogger('dag') | |
logger.setLevel(logging.INFO) | |
def get_url(bucket_name, obj): | |
return f"s3://{bucket}/{obj.key}" |
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
#include <iostream> | |
#include <string> | |
#include <folly/ConcurrentSkipList.h> | |
static std::string makeRandomeString(int len) { | |
std::string s; | |
for (int j = 0; j < len; j++) { | |
s.push_back((rand() % 26) + 'A'); | |
} |
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
package main | |
import ( | |
"crypto/rand" | |
"crypto/hmac" | |
"crypto/sha1" | |
"encoding/base32" | |
"time" | |
"fmt" | |
) |
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
from thrift.protocol import TBinaryProtocol | |
from thrift.transport import TTransport | |
from schemas.singer.ttypes import LogMessage | |
fstream = open("./tf.log","rb") | |
transport = TTransport.TFramedTransport(TTransport.TFileObjectTransport(fstream)) | |
protocol = TBinaryProtocol.TBinaryProtocol(transport) | |
transport.open() |
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
#include "rocksdb/db.h" | |
#include <iostream> | |
int main(int argc, char *argv[]) { | |
rocksdb::DB* db; | |
rocksdb::Options options; | |
options.create_if_missing = true; | |
rocksdb::Status status = rocksdb::DB::Open(options, argv[1], &db); | |
std::cout << status.ok() << std::endl; |
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
DAG=$1 | |
START=$2 | |
END=$3 | |
run() { | |
CMD="airflow backfill $DAG -s $1" | |
$CMD | |
RET=$? | |
return $RET | |
} |
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
#include <stdint.h> | |
#include <stdio.h> | |
#include <map> | |
#include <vector> | |
#include <memory> | |
#include <type_traits> | |
#include <utility> | |
#include <iostream> | |
#include <chrono> |
NewerOlder