From 6e7aecd8544aa51493debdbfedc4ff634c4f08f9 Mon Sep 17 00:00:00 2001 From: Masashi Umezawa Date: Sat, 4 Jan 2020 22:06:48 +0900 Subject: [PATCH 1/2] TrRequest>>asTaskFor: will raise an exception on failure --- .../TrRequest.extension/instance/asTaskFor..st | 5 +++-- .../TrRequest.extension/methodProperties.json | 2 +- repository/Tarantalk-TaskIt.package/monticello.meta/version | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/repository/Tarantalk-TaskIt.package/TrRequest.extension/instance/asTaskFor..st b/repository/Tarantalk-TaskIt.package/TrRequest.extension/instance/asTaskFor..st index d2112ac..ac662e2 100644 --- a/repository/Tarantalk-TaskIt.package/TrRequest.extension/instance/asTaskFor..st +++ b/repository/Tarantalk-TaskIt.package/TrRequest.extension/instance/asTaskFor..st @@ -1,7 +1,8 @@ *Tarantalk-TaskIt asTaskFor: waitTimeoutSeconds - ^ TKTTask valuable: [ | proxy val | + ^ TKTTask valuable: [ | proxy | proxy := self proxyFor: waitTimeoutSeconds. - (val := proxy value) isError ifTrue: [ val signal ]. + proxy value. + proxy isError ifTrue: [ proxy signal ]. proxy ] \ No newline at end of file diff --git a/repository/Tarantalk-TaskIt.package/TrRequest.extension/methodProperties.json b/repository/Tarantalk-TaskIt.package/TrRequest.extension/methodProperties.json index 6a5c9e4..918ab40 100644 --- a/repository/Tarantalk-TaskIt.package/TrRequest.extension/methodProperties.json +++ b/repository/Tarantalk-TaskIt.package/TrRequest.extension/methodProperties.json @@ -3,7 +3,7 @@ "future:for:" : "MasashiUmezawa 12/30/2019 22:53", "schedule:for:" : "MasashiUmezawa 12/30/2019 22:54", "taskRunner" : "MasashiUmezawa 12/15/2019 14:46", - "asTaskFor:" : "MasashiUmezawa 1/4/2020 21:44", + "asTaskFor:" : "MasashiUmezawa 1/4/2020 22:05", "schedule" : "MasashiUmezawa 12/15/2019 21:54", "schedule:" : "MasashiUmezawa 12/30/2019 22:54", "taskRunnerFactoryClass" : "MasashiUmezawa 12/15/2019 14:47", diff --git a/repository/Tarantalk-TaskIt.package/monticello.meta/version b/repository/Tarantalk-TaskIt.package/monticello.meta/version index 84d32b3..149e921 100644 --- a/repository/Tarantalk-TaskIt.package/monticello.meta/version +++ b/repository/Tarantalk-TaskIt.package/monticello.meta/version @@ -1 +1 @@ -(name 'Tarantalk-TaskIt-MasashiUmezawa.10' message 'TrRequest>>asTaskFor: will raise an exception on failure' id '08c0aa8a-b157-0d00-8e79-d0dc09b86837' date '4 January 2020' time '9:45:44.512643 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.9' message 'Added asTaskFor: for setting waitTimeout explicitly' id '951dac1e-4e57-0d00-b9b0-937401a377fc' date '30 December 2019' time '11:08:50.900517 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.8' message 'Changed asTask to senf #value before returning proxy' id '723e0046-ad56-0d00-9372-85ec0804dfda' date '22 December 2019' time '11:15:00.990745 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.7' message 'Added TrSpace>>futureAt: series' id 'a130fd82-6c56-0d00-91f5-ddea0fdc8cc3' date '19 December 2019' time '5:59:11.32652 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.6' message 'Fixed TrRequest>>asTask to use proxy' id 'fb549a46-4956-0d00-84fd-2bc7085f201d' date '17 December 2019' time '11:56:54.35951 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.5' message 'Added TrRequest>>future: and schedule:' id 'edc5865b-1f56-0d00-8ce2-af3d075f0498' date '15 December 2019' time '9:56:16.772725 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.4' message 'Updated TrSettings>>taskRunnerType comment' id '90a15a29-1f56-0d00-8ce1-6365075f0498' date '15 December 2019' time '9:42:15.019012 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.3' message 'Adding TrTaskRunnerFactory' id 'ca5f32f0-1956-0d00-bf14-89260d4293df' date '15 December 2019' time '3:28:21.242974 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.2' message 'Experimentally added TrFutureValue' id 'db3ffc54-0d56-0d00-84f2-890803642893' date '15 December 2019' time '12:25:57.619821 am' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.1' message 'Experimentally added TrFutureValue' id '768f394d-0d56-0d00-84f1-a8ab03642893' date '15 December 2019' time '12:23:47.420164 am' author 'MasashiUmezawa' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file +(name 'Tarantalk-TaskIt-MasashiUmezawa.11' message 'TrRequest>>asTaskFor: will raise an exception on failure' id '08d77dd4-b157-0d00-9f9b-de0505656bb8' date '4 January 2020' time '10:06:23.083484 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.10' message 'TrRequest>>asTaskFor: will raise an exception on failure' id '08c0aa8a-b157-0d00-8e79-d0dc09b86837' date '4 January 2020' time '9:45:44.512643 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.9' message 'Added asTaskFor: for setting waitTimeout explicitly' id '951dac1e-4e57-0d00-b9b0-937401a377fc' date '30 December 2019' time '11:08:50.900517 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.8' message 'Changed asTask to senf #value before returning proxy' id '723e0046-ad56-0d00-9372-85ec0804dfda' date '22 December 2019' time '11:15:00.990745 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.7' message 'Added TrSpace>>futureAt: series' id 'a130fd82-6c56-0d00-91f5-ddea0fdc8cc3' date '19 December 2019' time '5:59:11.32652 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.6' message 'Fixed TrRequest>>asTask to use proxy' id 'fb549a46-4956-0d00-84fd-2bc7085f201d' date '17 December 2019' time '11:56:54.35951 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.5' message 'Added TrRequest>>future: and schedule:' id 'edc5865b-1f56-0d00-8ce2-af3d075f0498' date '15 December 2019' time '9:56:16.772725 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.4' message 'Updated TrSettings>>taskRunnerType comment' id '90a15a29-1f56-0d00-8ce1-6365075f0498' date '15 December 2019' time '9:42:15.019012 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.3' message 'Adding TrTaskRunnerFactory' id 'ca5f32f0-1956-0d00-bf14-89260d4293df' date '15 December 2019' time '3:28:21.242974 pm' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.2' message 'Experimentally added TrFutureValue' id 'db3ffc54-0d56-0d00-84f2-890803642893' date '15 December 2019' time '12:25:57.619821 am' author 'MasashiUmezawa' ancestors ((name 'Tarantalk-TaskIt-MasashiUmezawa.1' message 'Experimentally added TrFutureValue' id '768f394d-0d56-0d00-84f1-a8ab03642893' date '15 December 2019' time '12:23:47.420164 am' author 'MasashiUmezawa' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) \ No newline at end of file From daa88cab2356d02ea2cf491770dbe4eccea699de Mon Sep 17 00:00:00 2001 From: Masashi Umezawa Date: Sat, 4 Jan 2020 22:15:59 +0900 Subject: [PATCH 2/2] Fixed error example --- doc/TaskIt-integration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/TaskIt-integration.md b/doc/TaskIt-integration.md index ac599df..80036a8 100644 --- a/doc/TaskIt-integration.md +++ b/doc/TaskIt-integration.md @@ -41,8 +41,8 @@ future := (talk asyncExecuteSql: 'select * from programming_languages') future. future onSuccessDo: [:ret | Transcript cr; show: ret ]; onSuccessDo: [:ret | ret metadata inspect ]; - onFailureDo: [:error | error inspect]; - onFailureDo: [:error | error pass]. + onFailureDo: [:error | error signal]; + onFailureDo: [:error | error inspect]. ``` ## Combining future sends