Skip to content

Machine tasks are never finished #81

@amureki

Description

@amureki

Greetings, @codingjoe and thanks for the great lib!

I tried to implement a flow that starts with the machine task.
Here is a close example of what I have:

from django.db import models
from joeflow.models import Workflow
from joeflow import tasks


class StartWorkflow(Workflow):
    start = tasks.Start()

    def end(self):
        pass

    edges = (
        (start, end),
    )

workflow = StartWorkflow.start()

When I execute this workflow, start task is scheduled, then it triggers end, which is then becomes finished.
However, the status of start task never changes and remains as scheduled.

I briefly checked the code and could not find where in the machine-generated task method finished is called like it is done in TaskViewMixin.next_task.

I will try to dig into it and provide a test case with a patch to this bug.

Best,
Rust

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions