Commit Graph

96 Commits

Author SHA1 Message Date
Asher Foa
3bb31c84fd Fix some typos 2019-11-16 12:31:45 -08:00
Asher Foa
96e5b1993d Run black on moto & test directories. 2019-10-31 10:36:05 -07:00
Chih-Hsuan Yen
18173a5951
Replace # flake8: noqa with # noqa
The former syntax is actually a mis-use and rejected since Flake8 3.6
[1].

[1] https://gitlab.com/pycqa/flake8/merge_requests/219
2019-10-27 20:41:22 +08:00
George Ionita
3cede60f5b improved SWF support 2017-12-23 05:45:05 +02:00
Steve Pulec
6d422d1f37 Add BaseModel to all models. 2017-03-11 23:41:12 -05:00
Steve Pulec
f37bad0e00 Lints. 2017-02-23 21:37:43 -05:00
Steve Pulec
cad185c74d Cleanup headers and encoding. 2017-02-16 22:51:04 -05:00
Steve Pulec
fde721bed7 Testing new version of decorator. 2017-02-15 22:35:45 -05:00
Steve Pulec
d3df810065 Generalize decorator code. 2017-02-12 00:22:29 -05:00
Ian Fillion-de Kiewit
4e0affc734 Fix date validation 2016-02-08 10:33:33 -05:00
Ian Fillion-de Kiewit
7fd3daa524 Fix python 3.3 tests 2016-02-08 10:14:07 -05:00
Ian Fillion-de Kiewit
0fa7f83270 Fix time checking and tests 2016-02-05 17:33:33 -05:00
Ian Fillion-de Kiewit
2389b95ee6 remove leftover ipdb 2016-02-05 15:38:36 -05:00
Ian Fillion-de Kiewit
d31105889e Add list_closed_workflow_executions and make validation/filtering on list_open_workflow_executions better 2016-02-05 15:35:46 -05:00
Ian Fillion-de Kiewit
93120927f7 Add list_open_workflow_executions endpoint 2016-02-04 17:14:33 -05:00
Ian Fillion-de Kiewit
129b4faff8 Fix style issues 2016-02-02 14:02:37 -05:00
Steve Pulec
a53a97d136 Cleanup SWF to use HTTP exceptions so that the standalone server will work. Closes #495. 2016-01-17 18:00:57 -05:00
Steve Pulec
705ec314a3 Cleanup different places using unix_time() 2015-11-27 14:14:40 -05:00
Jean-Baptiste Barth
566a90800e Make SWF events formatting more generic
(suggested in @spulec review)
2015-11-23 14:52:16 +01:00
Jean-Baptiste Barth
45437368b2 Move SWF type checks to response object
(suggested in @spulec review)
2015-11-23 12:41:44 +01:00
Jean-Baptiste Barth
78ea7967ad Remove overriden SWFResponse.call_action() thanks to 32dd72f
Not necessary anymore: 32dd72f6b7
2015-11-19 11:46:54 +01:00
Jean-Baptiste Barth
26980f41a6 Replace globals() call with a static mapping
(suggested in @spulec review)
2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
6b581edb55 Use datetime.utcnow() instead of datetime.now()
(suggested in @spulec review)
2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
5f0684fca5 Use dict.values() instead of dict.items() where possible
(suggested in @spulec review)
2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
de646cf7ac Fix python 3 compatibility: filter() returns an iterator now 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
248975d4e6 Improve SWF timeouts processing: now processed in order, one by one 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
7f2cbb79b0 Refactor SWF workflow execution to ease next timeout change 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
6027bf15c1 Move some timeout conditionals to concerned models 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
d007dfe3ff Remove process_timeouts() method in favor of timeout(<Timeout>) and a helper for tests 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
65c35bfa69 Make timeout events appear at the right time in workflow history 2015-11-19 11:45:27 +01:00
Jean-Baptiste Barth
d618585790 Refactor timeouts processing so it will be easier to compute them in order 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
61bb550052 Ensure activity and decision tasks cannot progress on a closed workflow
This is a second barrier because I'm a little nervous about this and I
don't want moto/swf to make any activity progress while in the real
world service, it's strictly impossible once the execution is closed.
Python doesn't seem to have any nice way of freezing an object so here
we go with a manual boundary...
2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
65c95ab5bc Ensure activity and decision tasks cannot timeout on a closed workflow 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
9c3996ff58 Add WorkflowExecution.open to clarify code in some places 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
f38d23e483 Implement start to close timeout on SWF workflow executions 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
86973f2b87 Implement start to close timeout on SWF decision tasks 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
b386495520 Use list comprehensions instead of filter() for easier moto/swf python 3.x compatibility 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
3a5f679783 Fix python 3.3 compatibility in moto/swf regarging string types detection 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
c0b4aadd92 Fix python 3.x compatibility regarding json loading
Error on travis-ci was:

    TypeError: can't use a string pattern on a bytes-like object
2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
2cd3d5fb45 Fix python 3.x compatibility regarding iterations on a dict
Error on travis-ci was:

    AttributeError: 'dict' object has no attribute 'iteritems'

And actually it's been removed in python 3.x in favor of dict.items()
2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
e9732140e5 Fix python 2.6 compatibility for moto/swf 2015-11-19 11:45:26 +01:00
Jean-Baptiste Barth
90c8797abd Implement heartbeat timeout on SWF activity tasks 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
f576f3765c Add SWF endpoint RecordActivityTaskHeartbeat 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
804d2e91b5 Improve workflow selection before raising a WorkflowExecutionAlreadyStartedFault 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
96d6bb056b Add SWF endpoint TerminateWorkflowExecution 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
98948a01c8 Add missing attributes in DescribeWorkflowExecution responses 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
fd12e317f8 Add SWF endpoint RespondActivityTaskFailed 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
c9e8ad03f8 Add SWF endpoint RespondActivityTaskCompleted 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
08643945df Add SWF endpoint CountPendingActivityTasks 2015-11-19 11:45:25 +01:00
Jean-Baptiste Barth
761ab816f9 Add SWF endpoint PollForActivityTask 2015-11-19 11:45:25 +01:00