Code Monkey home page Code Monkey logo

Comments (1)

coleifer avatar coleifer commented on June 12, 2024

Not sure what to tell you. The django example in the examples/ directory is working just fine.

Modified tasks.py to add the following:

# django_ex/test_app/tasks.py
@task()
def huey_task():
    print('this is a huey task')

Then in one terminal I ran:

# ./manage.py shell
from django_ex.test_app.tasks import *
huey_task()

And observed the output:

# Terminal 1
./manage.py run_huey

# Output
08:05:52 Huey consumer started with 4 thread, PID 4879 at 2023-08-16 13:05:52.908917
08:05:52 Scheduler runs every 1 second(s).
08:05:52 Periodic tasks are enabled.
08:05:52 The following commands are available:
+ djangoex.test_app.tasks.add
+ djangoex.test_app.tasks.mul
+ djangoex.test_app.tasks.slow
+ djangoex.test_app.tasks.flaky_task
+ djangoex.test_app.tasks.every_other_minute
+ djangoex.test_app.tasks.every_five_mins
+ djangoex.test_app.tasks.after_commit
+ djangoex.test_app.tasks.huey_task
08:06:34 Executing djangoex.test_app.tasks.huey_task: 735b745b-2bfa-4a33-bc4e-ecdce3ff9382
this is a huey task
08:06:34 djangoex.test_app.tasks.huey_task: 735b745b-2bfa-4a33-bc4e-ecdce3ff9382 executed in 0.000s

from huey.

Related Issues (20)

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.