Skip to content

Add migration for celio.store.onChange method to guide #7

@MasterOdin

Description

@MasterOdin

The celio library has this method defined in their store code:

    onChange(key, handler) {
        const keyChannel = `__keyspace@${this.database}__:${key}`
        this.subscriber.subscribe(keyChannel)
        this.subscriber.on('message', (channel, event) => {
            if (channel === keyChannel) {
                handler(event)
            }
        })
    }

where this.subscriber is defined as:

        this.client = redis.createClient(options)
        this.subscriber = this.client.duplicate()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions