CloudSlang / cloud-slang

CloudSlang Language, CLI and Builder
http://cloudslang.io
Apache License 2.0
235 stars 82 forks source link

EVENT_ACTION_START not logged properly.. [2] #444

Open levice14 opened 9 years ago

levice14 commented 9 years ago

when the java/python action's execution is hanging, because events are fired and processed on the same thread.. (related to #437 )

correct scenario:

(Thread ID: 29) Event fired: EVENT_ACTION_START :io.cloudslang.content.httpclient.HttpClientAction.execute
(Thread ID: 29) HttpClient START
(Thread ID: 29) HttpClient END
(Thread ID: 29) Logging event: EVENT_ACTION_START
(Thread ID: 29) Logging event: EVENT_ACTION_END

but when the action is pending only EVENT_INPUT_START and EVENT_INPUT_END are shown. EVENT_ACTION_START not logged despite of the fact that the event is fired

so the logs are misleading in this case.

Suggestion for solution: The events and actions are now working on the same main thread. [The registration to the events occurs in cloudslang-cli -> SlangCLI class] We are not able to control when a listener is invoked, so the solution is to plain threading mechanism that will separate events and actions into different threads.

levice14 commented 8 years ago

this issue will probably become Not Relevant once #506 will be tackled

tethryus commented 7 years ago

@Bonczidai Has this issue been resolved in the latest builder?

levice14 commented 7 years ago

I think not, but worth recheking it

you could do that by invoking a python operation that blocks (e.g. inifite loop) and check whether the EVENT_ACTION_START event is in the logs for that specific action