geekq / workflow

Ruby finite-state-machine-inspired API for modeling workflow
MIT License
1.75k stars 207 forks source link

Is geekq/workflow thread safe in multi tenant applicaton? #176

Closed emclab closed 2 years ago

emclab commented 8 years ago

The geekq/workflow defines a workflow in model with workflow.assign_specficiation with self.workflow_spec. In a multi tenant application, is this workflow_spec thread safe when multi users login and may all have their own workflow_spec for the same model? Put the same question in different words, may one user's workflow_spec for model A be overwritten by another user's?

emclab commented 8 years ago

What we find is that workflow_spec is overwritten by user who logs in late. There is only one workflow spec can be defined for one running app. geekq/workflow is not thread safe in mult tenant application. Any comments?

jimcavoli commented 8 years ago

This may be a good thing to try and tackle following the Rails 5 release and compatibility verification. @emclab Have you done any work toward refactoring into a thread safe approach?