Questions tagged [python-huey]

Distributed task queue framework for python.

Python Huey is a distributed queue management system. It relies on a broker (currently Redis is supported) for delivering jobs specification to workers machines. A decorator-based syntax allows close-to-seamless integration with existing software.

Huey represents a simple but viable alternative to Python Celery.

54 questions
0
votes
0 answers

Is there a way to start huey with django and pass settings only related to huey?

When I start huey with manage.py it brings all the settings and logic from the current configuration class. Is there a way to pass only huey-related settings to huey? Something like python manage.py run_huey…
Denys
  • 1
0
votes
1 answer

Using Huey with Django: How to keep run_huey command running?

I'm using Django on Ubuntu 18.04. I've got everything set up. And I type python manage.py run_huey in the server (through an SSH connection) to start huey, and it works. However this is done through the command line through SSH and it will shut off…
Valachio
  • 1,025
  • 2
  • 18
  • 40
0
votes
0 answers

Django huey file not processing all tasks

This is very strange. I don't want to setup a Redis service and since my queue has only very little requirements file or sqlite would work just fine. The both work fine on localhost, but when I deploy it to a docker container there are the following…
rapsli
  • 749
  • 1
  • 8
  • 23
0
votes
1 answer

Flask, push application context for Flask-sqlalchemy to huey worker

I'm novice novice with the python ecosystem and in web development and I would like to build an application with the Flask framework. This application will have to execute a background task. For this I chose to use the huey task queue. The…
wadl
  • 3
  • 1
0
votes
1 answer

AttributeError: 'int' object has no attribute 'timetuple'

Quick note: this error may be somewhat linked to this thread, but the use case and python version (the other one is still at v2) is different. Other similar threads don't regard specifically to python datetime. I have the following code: import…
crimsonpython24
  • 2,223
  • 2
  • 11
  • 27
0
votes
0 answers

Prevent Django from Removing Previous Entries in PostgreSQL

I have the following Django code that is being run on PostgreSQL and Huey (an automatic scheduler). The problem is that, whenever the periodic task is run, Django removes the previous rows in a table instead of adding on to existent ones. Scheduled…
crimsonpython24
  • 2,223
  • 2
  • 11
  • 27
0
votes
1 answer

start process consumer from code and get signal callbacks

how can i start process consumers from code for cpu bound tasks ? And how can i get signal callbacks without immediate ? If i run MemoryHuey with immediate=True all works fine but if i set it to False i get only empty lists. Problem: I have several…
0
votes
1 answer

How to add expiry date in HUEY dynamic periodic task just like in celery tasks?

Is there a way to add expiry date to a Huey Dynamic periodic task ? Just like there is an option in celery task - "some_celery_task.apply_async(args=('foo',), expires=expiry_date)" to add expiry date while creating the task. I want to add the expiry…
0
votes
1 answer

How can i run multiple tasks with parameters on huey?

I made the settings similar to those of celery SCHEDULE_SETTINGS = { 'x': { 'task': 'app.tasks.x', 'schedule': crontab(minute='*/1'), 'kwargs': dict(xx='some') }, 'y': { 'task': 'app.tasks.y', …
Dmitriy
  • 211
  • 2
  • 10
0
votes
1 answer

django huey is always returning empty queryset while filtering

@db_task() def test_db_access(tenant_id, batch_obj): print('DBAccess') print(tenant_id) print(batch_obj.id) files = File.objects.filter(batch_id=batch_obj.id) print(files) If I run this in django without django-huey, I get a…
Vaibhav
  • 507
  • 2
  • 4
  • 20
0
votes
0 answers

How to speed up GET requests when using a Queue

I'm using Huey/Hueyx as a queue to buffer resources I need to GET with pythons requests library. Credentials (a token) are stored in Redis and the task executor calls the function, gets the resource and then indexes it to elastic search. Because I…
simplex123
  • 47
  • 2
  • 7
0
votes
1 answer

Huey not calling tasks in Django

I have a Django rest framework app that calls 2 huey tasks in succession in a serializer create method like so: ... def create(self, validated_data): user = self.context['request'].user player_ids = validated_data.get('players', []) game…
Cameron Sima
  • 5,086
  • 6
  • 28
  • 47
0
votes
1 answer

Getting task result with python huey from redis data store

I'm working with the huey task queue https://github.com/coleifer/huey in flask . I'm trying to run a task and get a task id number back from my initial function: @main.route('/renew',methods=['GET', 'POST']) def renew(): print(request.form) …
user1592380
  • 34,265
  • 92
  • 284
  • 515
0
votes
1 answer

Issue with running huey_consumer.py demo.huey on windows

I tried to follow this guide to test huey task queue on windows: https://huey.readthedocs.io/en/latest/guide.html when I run this command: huey_consumer.py demo.huey This Error shows up: from huey.consumer import Consumer ImportError: No…
Jason
  • 53
  • 1
  • 6
0
votes
1 answer

Managing shared resources with threads in Huey

I have to update many rows (increment one value in each rows) in peewee database (SqliteDatabase). Some objects can be uncreated so I have to create them with default values before working with them. I would use ways which are in peewee docs (Atomic…