deployer icon indicating copy to clipboard operation
deployer copied to clipboard

before()/after() wildchar or beforeAll()/afterAll()

Open lucatrev opened this issue 10 years ago • 6 comments

Q A
Issue Type Feature Request
Deployer Version N/A
Local Machine OS N/A
Remote Machine OS N/A

Description

I think it could be useful to have a catch 'em all option for after()/before() to run specific task before/after all other task. This could be useful in use cases like #777.

Proposed interface:

before('*', 'timer:start');
after('*', 'timer:stop');
-or-
beforeAll('timer:start');
afterAll('timer:stop');

lucatrev avatar Sep 23 '16 17:09 lucatrev

that's right and for parallel too because now when i do some task after('count_time') i get the longest time for server node(because task ends when all servers done) not for each server. For statistics usage it could be very useful to get information about: task_name, execution_time, server...

thx

gulios avatar Sep 26 '16 09:09 gulios

@luke83 i think that beforeAll and afterAll can lead to messing of callback execution order. It will become less obvious for reading and understanding. According to #777 it's easier to add profiling feature in verbose mode.

pluseg avatar Sep 30 '16 01:09 pluseg

I think it's better to use event system here.

antonmedv avatar Oct 06 '16 07:10 antonmedv

Events in v4.

antonmedv avatar Nov 08 '16 09:11 antonmedv

@elfet is the event system already implemented in 4.1?

radutopala avatar Nov 20 '16 05:11 radutopala

No, not in v4. Probably will be in 4.1. Or maybe will back to wildchar with *.

antonmedv avatar Nov 20 '16 06:11 antonmedv