botify-labs / simpleflow

Python library for dataflow programming.
https://botify-labs.github.com/simpleflow/
MIT License
68 stars 24 forks source link

simpleflow.activity.Activity timeout arguments aren't optional #36

Open mprecise opened 9 years ago

mprecise commented 9 years ago

I created all of my activity types, workflow types, and domains manually in the AWS console before I began using simpleflow, so I have no experience trying to register these types using simpleflow. Since my types were pre-registered, I thought I'd be able to leave off all four of the timeout parameters when decorating an activity function with @simpleflow.activity.with_attributes. However, my decider received this error

  File "/usr/local/lib/python2.7/dist-packages/swf/actors/decider.py", line 53, in complete
    raise ResponseError(e.body['message'])
ResponseError: Invalid duration: None

Adding the timeouts to the decorator parameters fixed this. If these are indeed optional, I assume the fix is for the library to remove any keys whose value is None before making the request.

ggreg commented 9 years ago

The problem seems to come from https://github.com/botify-labs/python-simple-workflow. I created https://github.com/botify-labs/python-simple-workflow/issues/47 to fix it.