Skip to content
This repository was archived by the owner on Apr 12, 2018. It is now read-only.

Commit 8befc18

Browse files
committed
Update actors.worker: wrap reason and details when task fails
1 parent 28fea7a commit 8befc18

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

swf/actors/worker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from swf.actors import Actor
55
from swf.models import ActivityTask
66
from swf.exceptions import PollTimeout, ResponseError, DoesNotExistError
7+
from swf import format
78

89

910
class ActivityWorker(Actor):
@@ -92,8 +93,8 @@ def fail(self, task_token, details=None, reason=None):
9293
try:
9394
return self.connection.respond_activity_task_failed(
9495
task_token,
95-
details,
96-
reason
96+
details=format.details(details),
97+
reason=format.reason(reason),
9798
)
9899
except boto.exception.SWFResponseError as e:
99100
if e.error_code == 'UnknownResourceFault':

0 commit comments

Comments
 (0)