Hi Guys,
I use Chainlink to request data and then save it in a local variable. This variable is then assigned to an array. Unfortunately the data assignment to the array is not synchronous, because I get the result from Chainlink a bit later.
What can I do so that only when I receive the data from Chainlik, is it assigned to the array?
unable to lock ORM: dial tcp 127.0.0.1:5432: connect: connection refused
error when trying to start the chainlink container connecting to a postgres running in another container. i can connect to the db using a postgres client and i am using sslmode=disable
host.docker.internal
to tell docker that i want to connect to the host's localhost, not containers localhost
ROOT=/chainlink
LOG_LEVEL=debug
ETH_CHAIN_ID=3
MIN_OUTGOING_CONFIRMATIONS=2
LINK_CONTRACT_ADDRESS=0x20fe562d797a42dcb3399062ae9546cd06f63280
CHAINLINK_TLS_PORT=0
SECURE_COOKIES=false
ALLOW_ORIGINS=*
ETH_URL=wss://ropsten-rpc.linkpool.io/ws
DATABASE_URL=postgresql://dbUsername:dbPASSWORD@127.0.0.1:5432/DATABASE?sslmode=disabled
DATABASE_TIMEOUT=0
-> chainlink git:(readme-build-steps) go run ./core/main.go local db preparetest
2020-06-24T16:28:16Z [INFO] Resetting database: "postgresql://localhost:5432/chainlink_test?ssl_mode=disable" cmd/local_client.go:360
unable to drop postgres database: pq: password authentication failed for user "ahmad"
docker run --name eth --restart always -p 8546:8546 -v ~/.geth-ropsten:/geth -it ethereum/client-go:v1.9.15 --testnet --nousb --ws --ipcdisable --wsaddr 0.0.0.0 --wsorigins="*" --datadir /geth
truffle(ropsten)> b.logs[0]
{
address: '0x4a80592d67ABEB37066e242D095E7AfB433C348F',
blockHash: '0x6fea9c06796aafee95494ba3417b8476aa45f13ed41c1fda2523ebb78ea46cb9',
blockNumber: 8440283,
logIndex: 0,
removed: false,
transactionHash: '0xbcc4187dd47afa20f102fbb651ee9db1bf183a3c3402536bedc6aec7549168fe',
transactionIndex: 0,
id: 'log_cd198343',
event: 'ChainlinkRequested',
args: Result {
'0': '0x570b66aaba17715572f9dfea18ed329441f509734ae6376bab9ff51c6997c594',
__length__: 1,
id: '0x570b66aaba17715572f9dfea18ed329441f509734ae6376bab9ff51c6997c594'
}
}
docker run -d --name postgres -e POSTGRES_DB=chainlink_db -e POSTGRES_USER=node1 -e POSTGRES_PASSWORD=pass -v ~/postgres-data:/var/lib/postgresql/data -p 5432:5432 postgres
ROOT=/chainlink
LOG_LEVEL=debug
ETH_CHAIN_ID=42
MIN_OUTGOING_CONFIRMATIONS=2
LINK_CONTRACT_ADDRESS=0xa36085F69e2889c224210F603D836748e7dC0088
CHAINLINK_TLS_PORT=0
SECURE_COOKIES=false
GAS_UPDATER_ENABLED=true
ALLOW_ORIGINS=*
DATABASE_URL=postgresql://node1:pass@postgres/chainlink_db
``2020-08-08T16:42:15Z [FATAL] Unable to initialize ORM: dial tcp: lookup postgres on 172.31.0.2:53: no such host
unable to open postgresql://node1:pass@postgres/chainlink_db for gorm DB