Skip to content

Commit

Permalink
bug 修复
Browse files Browse the repository at this point in the history
  • Loading branch information
pakizheng committed Jan 11, 2024
1 parent 53b520e commit 7617d8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@ jobs:
run: |
sudo apt-get install -y sshpass
sshpass -p "$SERVER_PASSWORD" ssh -o StrictHostKeyChecking=no root@${{ secrets.SERVER_ID }} "
cd /root/dockers
if docker ps -a --format "{{.Names}}" | grep -w "im-web"; then
docker-compose down
fi
echo '${{ secrets.DOCKERHUB_TOKEN }}' | docker login --username zhengpq --password-stdin
docker-compose pull
docker-compose pull
docker-compose up -d
"
4 changes: 1 addition & 3 deletions src/gateways/redis-io-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ export class RedisIoAdapter extends IoAdapter {
private adapterConstructor: ReturnType<typeof createAdapter>;

async connectToRedis(): Promise<void> {
const pubClient = createClient({ url: `redis://106.53.170.67:6379` });
const pubClient = createClient({ url: `redis://localhost:6379` });
const subClient = pubClient.duplicate();

await Promise.all([pubClient.connect(), subClient.connect()]);

this.adapterConstructor = createAdapter(pubClient, subClient);
}



createIOServer(port: number, options?: ServerOptions): any {
const server = super.createIOServer(port, options);
server.adapter(this.adapterConstructor);
Expand Down

0 comments on commit 7617d8b

Please sign in to comment.