Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with register_tasks and empty tasks list #237

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

nazywam
Copy link
Member

@nazywam nazywam commented Dec 27, 2023

Closes #236

When backend.register_tasks -

def register_tasks(self, tasks: List[Task]) -> None:
is called with an empty list of tasks to create it results in a crash when calling mset:

redis.exceptions.ResponseError: wrong number of arguments for 'mset' command

Reproduction:
Downgrade to <4.4.0, create a new task and create a new "NOP" operational task by setting the task status to its current value:

producer = Producer(identity="test-producer")
headers = {
    "kind": "raw",
    "type": "sample"
}
t = Task(headers=headers, payload={
    "sample": "sample",
})
producer.send_task(t)
producer.backend.set_task_status(t, TaskState.DECLARED)

@nazywam nazywam requested a review from a team December 27, 2023 06:11
@nazywam nazywam changed the title Fix issues with register_tasks and empty tasklist Fix issues with register_tasks and empty tass klist Dec 27, 2023
@nazywam nazywam changed the title Fix issues with register_tasks and empty tass klist Fix issues with register_tasks and empty tasks list Dec 27, 2023
@nazywam nazywam merged commit bb8aba6 into master Dec 28, 2023
6 checks passed
@nazywam nazywam deleted the fix/register-tasks branch December 28, 2023 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redis issue with 'mset' ?
2 participants