GithubHelp home page GithubHelp logo

hueylogs's Introduction

hueylogs

What

Hueylogs is a django app/plugin for registering the calling of huey tasks. (Truly, it can work with any thing in python/django not just background tasks, Ive called it hueylogs to a better focus). With it is possible to know how many times a task did last, when it were runned, if it raises many errors, and to interrupt the tasks if so, and in the future, the goal is have some metrics about the memory usage of task and so on.

Example:

# myapp/tasks.py
from hueylogs.models import HueyExecutionLog
from huey.contrib.djhuey import db_task

@db_task()
@HueyExecutionLog.register_log
def print_ok():
    print("OK")

HueyExecutionLog.objects.all().delete()
print_ok.call_local()
assert HueyExecutionLog.objects.count() == 1

Why

I've created hueylogs because I have missed the logs that django cron give to me and some features like retry delay.

When

I start this project when all my personal/professional projects start using huey as the backgroung task manager. Because of that, I will probably update this project every time a project mine need some feature. But feel encouraged to contribute to my little project as well :D

API

Is possible to verify huey logs by requesting the endpoint hueylogs/ once you use DRF with Django.

To Enable the API you must go to your project settings and configure:

from django.conf import settings
from django.conf.urls import include, url

if "hueylogs" in settings.INSTALLED_APPS:
    urlpatterns.append(url(r'^api/', include('hueylogs.urls')))

In the example above the endpoint is prefixed with /api/, so in your browser you must navigate to http://localhost:8000/api/hueylogs/.

hueylogs's People

Contributors

cptx032 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

rsp2k

hueylogs's Issues

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.