Skip to content

Trafitto/healthcheck-decorator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f6e074e · Oct 20, 2023

History

17 Commits
Oct 20, 2023
Oct 20, 2023
Sep 20, 2022
Sep 19, 2022
Oct 20, 2023
Oct 20, 2023
Sep 20, 2022
Sep 20, 2022
Sep 10, 2022
Sep 20, 2022

Repository files navigation

Healthcheck-decorator

The idea is to decorate a function to monitor if it is executed

How to use

Simply add the decorator to the function you want to monitor

from healtcheck_decorator.healthcheck import healthcheck


@healthcheck
def test():
    pass

Without any parameters, the decorator adds the function to the monitor using the name of the function itself as a key to save it in the cache.

@healthcheck(key='TEST-KEY')

Monitor

You can check all the function added to monitor with:

keys = HealthcheckedFunctionMonitor().get()

HealthcheckedFunctionMonitor is a singleton

More info on the implementation here: healthcheck-decorator-pip-tester

Tests

Before launching the tests you must make sure you have installed the package with:

make package_install

or

pip install .

Then you can launch the test:

make test

or

pytest

About

The idea is to decorate a function to monitor if it is executed

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published