Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

models.event: non-deterministic lookup in factory #45

Open
ggreg opened this issue Mar 24, 2015 · 0 comments
Open

models.event: non-deterministic lookup in factory #45

ggreg opened this issue Mar 24, 2015 · 0 comments
Assignees
Labels

Comments

@ggreg
Copy link
Contributor

ggreg commented Mar 24, 2015

The way simple-workflow lookups the name of event types is non-deterministic. It iterates of the keys of the EVENTS dict. There is no guaranty in the order of keys in a Python dict, that's why there is a collections.OrderedDict class. Thus when it encounters a StartChildWorkflowExecutionInitiated event it either returns a ChildWorkflowExecution or a WorkflowExecution type. I had the two cases by executing code with CPython2.7 (returns WorkflowExecution) and pypy 2.5.0 (returns ChildWorkflowExecution), though of course it depends on the environment and not on the interpreter itself (even CPython2.7 dict may iterate keys on a different order).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant