diff options
| author | Brian Potchik <brian@vector35.com> | 2024-11-05 23:18:48 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2024-11-05 23:18:48 -0500 |
| commit | 62f2addc577d1a202907527ad3c5a2135b5db0eb (patch) | |
| tree | 3620a1434c51fe2fc5890f3c245a6e5a54f8f4c7 /python | |
| parent | 4382307a48d0021f7d2cc5dc352fb8ac8b5b1b88 (diff) | |
Add delay support to workflow machine.
Diffstat (limited to 'python')
| -rw-r--r-- | python/workflow.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/python/workflow.py b/python/workflow.py index 8213a6b6..bf47a41a 100644 --- a/python/workflow.py +++ b/python/workflow.py @@ -715,6 +715,13 @@ class WorkflowMachine: else: return json.loads(core.BNPostWorkflowRequestForBinaryView(self.handle, request)) + def delay(self, duration): + request = json.dumps({"command": "delay", "duration": duration}) + if self.is_function_machine: + return json.loads(core.BNPostWorkflowRequestForFunction(self.handle, request)) + else: + return json.loads(core.BNPostWorkflowRequestForBinaryView(self.handle, request)) + def request(self, request): if self.is_function_machine: return json.loads(core.BNPostWorkflowRequestForFunction(self.handle, request)) |
