GithubHelp home page GithubHelp logo

Event Listener about hueyx HOT 5 CLOSED

vrbrito avatar vrbrito commented on June 25, 2024
Event Listener

from hueyx.

Comments (5)

SeverinAlexB avatar SeverinAlexB commented on June 25, 2024

You get your huey instance by

from hueyx.queues import hueyx

HUEY_GENERAL = hueyx('general')
HUEY_MONITORS = hueyx('monitors')

Then you should access the storage by

storage = HUEY_GENERAL.storage

See https://huey.readthedocs.io/en/1.11.0/events.html#listening-to-events

Be aware, the huey base package replaced the event system by a signal system. Chances are that your code above is already deprecated. Hueyx itself is not tested yet with huey 2.0. See #4 .

from hueyx.

vrbrito avatar vrbrito commented on June 25, 2024

Do you know how to combine both storages on a single listener?

from hueyx.

SeverinAlexB avatar SeverinAlexB commented on June 25, 2024

With a hack yes. Have a look at the huey exporter
https://github.com/APGSGA/huey-exporter/blob/master/huey_exporter/EventListener.py#L102

It provides Prometheus metrics and explores/subscribes queues automatically.

from hueyx.

vrbrito avatar vrbrito commented on June 25, 2024

Thank you very much, @Sebubu

from hueyx.

SeverinAlexB avatar SeverinAlexB commented on June 25, 2024

Hueyx 1.0.0 has been released. The signal system is now supported.

from hueyx.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.