这是indexloc提供的服务,不要输入任何密码
Skip to content
This repository was archived by the owner on Sep 24, 2022. It is now read-only.

Conversation

@rakeshkky
Copy link
Member

Exposes a function listen via a new module Database.PG.Query.Listen to allow listening
through a channel

@0x777 0x777 merged commit 2d0e9f4 into hasura:master Feb 6, 2019
shahidhk pushed a commit to hasura/graphql-engine that referenced this pull request Mar 12, 2019
…loses #1182) (#1574)

1. Haskel library `pg-client-hs` has been updated to expose a function that helps listen to `postgres` notifications over a `channel` in this [PR](hasura/pg-client-hs#5)
2. The server records an event in a table `hdb_catalog.hdb_cache_update_event` whenever any `/v1/query` (that changes metadata) is requested. A trigger notifies a `cache update` event via `hasura_cache_update` channel
3. The server runs two concurrent threads namely `listener` and `processor`. The `listener` thread listens to events on `hasura_cache_update` channel and pushed into a `Queue`. The `processor` thread fetches events from that `Queue` and processes it. Thus server rebuilds schema cache from database and updates.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants