File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 14
14
from typing import Set
15
15
from typing import Type
16
16
17
+ from pydantic import Field
18
+
17
19
from saf .collect .event_bus import EventBusCollectedEvent
18
20
from saf .collect .grains import GrainsCollectedEvent
19
21
from saf .models import CollectedEvent
@@ -32,7 +34,7 @@ class JobAggregateConfig(ProcessConfigBase):
32
34
Job aggregate collector configuration.
33
35
"""
34
36
35
- jobs : Set [str ]
37
+ jobs : Set [str ] = Field ( default_factory = set )
36
38
37
39
38
40
def get_config_schema () -> Type [JobAggregateConfig ]:
@@ -74,7 +76,10 @@ async def process(
74
76
jid = tag .split ("/" )[2 ]
75
77
# We will probably want to make this condition configurable
76
78
salt_func = data .get ("fun" , "" )
77
- for func_filter in ctx .config .jobs :
79
+ matching_jobs = ctx .config .jobs
80
+ if not matching_jobs :
81
+ matching_jobs .add ("*" )
82
+ for func_filter in matching_jobs :
78
83
if fnmatch .fnmatch (salt_func , func_filter ):
79
84
if jid not in ctx .cache ["watched_jids" ]:
80
85
ctx .cache ["watched_jids" ][jid ] = {
You can’t perform that action at this time.
0 commit comments