如何解决Socket.io-redis无法在ElasticLoadbalancer和React前端上运行
曾经尝试使用AWS的Socket.io,Express和elasticLoadbalancer创建实时聊天应用程序,以便能够升级。但不幸的是,无法弄清楚如何使用socket.io-redis。
我的Redis实例工作正常。在只有一个节点的本地环境中,我的应用程序可以在完全相同的设置下正常运行。显然,我在发射器上做错了,但我无法弄清楚。
这是我的代码。
Option Explicit
Sub detectHyperlinks()
' Source
Const srcName As String = "Sheet1"
Const srcFirst As String = "A1"
' Destination
Const dstName As String = "Sheet2"
Const dCellAddress As String = "D2"
' Define Source Column Range.
With ThisWorkbook.Worksheets(srcName)
Dim LastRow As Long
LastRow = .Cells(.Rows.Count,.Range(srcFirst).Column).End(xlUp).Row
Dim rng As Range
Set rng = .Range(cFirst).Resize(LastRow - .Range(cFirst).Row + 1)
End With
' Define Destination Address String.
Dim dAddr As String
dAddr = dstName & "!" & dCellAddress
Dim cel As Range ' Current Cell in Source Range
Dim sAddr As String ' Source Address String
' Iterate through cells in Source Column Range.
For Each cel In rng.Cells
' Evaluate if current cell does not contain an error or blank value.
If Not IsError(cel) And Not IsEmpty(cel.Value) Then
' Evaluate if current cell contains a hyperlink.
If cel.Hyperlinks.Count > 0 Then
' Write current cells Sub Address to Source Address String
' and remove the "'" and "$" characters.
sAddr = Replace(cel.Hyperlinks(1).SubAddress,"'","")
sAddr = Replace(sAddr,"$","")
' Allowing different case (vbTextCompare),evaluate
' if Source and Destination Address Strings are equal.
If StrComp(sAddr,dAddr,vbTextCompare) = 0 Then
' Do what you need to do with the found cell.
' For example print its address to the Immdediate window.
Debug.Print cel.Address
End If
End If
End If
Next cel
End Sub
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。