simpleflow icon indicating copy to clipboard operation
simpleflow copied to clipboard

AttributeError when "identity" is not provided to ActivityWorker

Open mprecise opened this issue 10 years ago • 1 comments

I thought the identity argument to swf.actors.worker.ActivityWorker's initializer and/or its poll method was optional, particularly since it has a default value of None. However, leaving it out causes an AttributeError.

  File "/usr/local/lib/python2.7/dist-packages/simpleflow/history.py", line 66, in parse_activity_event
    activity['identity'] = event.identity
AttributeError: 'ActivityTaskEvent' object has no attribute 'identity'

mprecise avatar Apr 15 '15 02:04 mprecise

Yes as specified by PollForActivityTask. This is a bug, the code does not have to assume that event has the identity attribute.

ggreg avatar Apr 19 '15 23:04 ggreg