File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
crates/extensions/tedge_gen_mapper/src Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ impl PipelineConfig {
52
52
let stage = StageConfig {
53
53
filter : FilterSpec :: JavaScript ( filter) ,
54
54
config : None ,
55
- tick_every_seconds : 1 ,
55
+ tick_every_seconds : 0 ,
56
56
meta_topics : vec ! [ ] ,
57
57
} ;
58
58
Self {
@@ -73,6 +73,7 @@ impl PipelineConfig {
73
73
let mut stage = stage. compile ( config_dir, i, & source) . await ?;
74
74
js_runtime. load_filter ( & mut stage. filter ) . await ?;
75
75
stage. check ( & source) ;
76
+ stage. fix ( ) ;
76
77
stages. push ( stage) ;
77
78
}
78
79
Ok ( Pipeline {
Original file line number Diff line number Diff line change @@ -133,6 +133,14 @@ impl Stage {
133
133
warn ! ( target: "MAPPING" , "Filter with no 'tick' function: {}; but configured with 'tick_every_seconds' in {pipeline}" , filter. path. display( ) ) ;
134
134
}
135
135
}
136
+
137
+ pub ( crate ) fn fix ( & mut self ) {
138
+ let filter = & mut self . filter ;
139
+ if !filter. no_js_tick && filter. tick_every_seconds == 0 {
140
+ // 0 as a default is not appropriate for a filter with a tick handler
141
+ filter. tick_every_seconds = 1 ;
142
+ }
143
+ }
136
144
}
137
145
138
146
impl DateTime {
You can’t perform that action at this time.
0 commit comments