chaps-io / gush

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

Use keyword arguments rather than positional arguments. #10

Closed stevenharman closed 9 years ago

stevenharman commented 9 years ago

One thing that might make this library a bit easier to use would be keyword arguments to configure a Workflow, rather than positional arguments. A quick look at the code suggests this is already doable (as the arguments are being collected by * and splatted back out when passing them along. So maybe just a tweak or mention in the README?

Thoughts?

pokonski commented 9 years ago

Yeah, I have no prefeference on that, since jobs have params which are a Hash. So maybe a regular hash for both?

Though keyword arguments in Ruby are, to be honest, a bit crappy and uncomfortable to use.

stevenharman commented 9 years ago

Though keyword arguments in Ruby are, to be honest, a bit crappy and uncomfortable to use.

Oh? I've found them super nice since Ruby 2.1 where we have required and optional keyword args.

At any rate... I think (but have not verified) that they'll Just Work :tm: as is.

pokonski commented 9 years ago

Oh, maybe I have an outdated bad impression from Ruby 2.0 :+1: Will check them out.

dmitrypol commented 6 years ago

+1