chaps-io / gush

Fast and distributed workflow runner using ActiveJob and Redis
MIT License
1.04k stars 104 forks source link

Workflow#reload not mutating workflow instance #37

Closed originalpete closed 7 years ago

originalpete commented 7 years ago

I've found either a bug in the code, or a bug in the docs. The README says:

screen shot 2017-05-25 at 14 53 26

However, when I try calling flow.reload, it doesn't mutate the flow instance status. Instead, I have to run flow.reload.status to get an up-to-date status:

> flow = MyWorkflow.create
> flow.status
 => :running 
> flow.start!
> flow.reload
> flow.status
=> :running
> flow.reload.status
=> :finished
pokonski commented 7 years ago

Hey, Peter! You are right, this could be a good change. Are you willing to submit a PR for this?

pokonski commented 7 years ago

@originalpete this is now fixed on the activejob branch which will become a 1.0 version very soon. Let me know if you get a chance to test it ou!