Skip to content

Commit 0d72a15

Browse files
Guillermo Alejandro Gallardo DiezGuillermo Alejandro Gallardo Diez
authored andcommitted
Merge branch 'fix/routines-v2' of github.com:gagdiez/ironclaw into fix/routines-v2
2 parents f0e7d5e + 547324a commit 0d72a15

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

src/bridge/effect_adapter.rs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,11 @@ impl EffectBridgeAdapter {
234234
.unwrap_or_else(|| synthetic_action_call_id(action_name)),
235235
action_name: action_name.to_string(),
236236
output: serde_json::json!({
237-
"error": "cadence is required. Use 'manual', a cron expression \
238-
(e.g. '0 9 * * *'), 'event:<channel>:<pattern>' \
239-
(e.g. 'event:telegram:.*'), or 'webhook:<path>'"
237+
"error": concat!(
238+
"cadence is required. Use 'manual', a cron expression ",
239+
"(e.g. '0 9 * * *'), 'event:<channel>:<pattern>' ",
240+
"(e.g. 'event:telegram:.*'), or 'webhook:<path>'"
241+
)
240242
}),
241243
is_error: true,
242244
duration: std::time::Duration::ZERO,
@@ -1224,9 +1226,11 @@ fn parse_cadence(
12241226
let (channel, pattern) = match rest.split_once(':') {
12251227
Some((ch, pat)) if !ch.is_empty() && !pat.is_empty() => (ch, pat),
12261228
_ => {
1227-
return Err("event cadence requires 'event:<channel>:<pattern>', \
1228-
e.g. 'event:telegram:.*' to match all messages on the telegram channel"
1229-
.to_string());
1229+
return Err(concat!(
1230+
"event cadence requires 'event:<channel>:<pattern>', ",
1231+
"e.g. 'event:telegram:.*' to match all messages on the telegram channel"
1232+
)
1233+
.to_string());
12301234
}
12311235
};
12321236
// Validate the pattern compiles as a regex.
@@ -1262,9 +1266,11 @@ fn parse_cadence(
12621266
})
12631267
} else {
12641268
Err(format!(
1265-
"unrecognized cadence '{s}'. Use 'manual', a cron expression \
1266-
(e.g. '0 9 * * *'), 'event:<channel>:<pattern>' (e.g. 'event:telegram:.*'), \
1267-
or 'webhook:<path>'"
1269+
concat!(
1270+
"unrecognized cadence '{s}'. Use 'manual', a cron expression ",
1271+
"(e.g. '0 9 * * *'), 'event:<channel>:<pattern>' ",
1272+
"(e.g. 'event:telegram:.*'), or 'webhook:<path>'"
1273+
)
12681274
))
12691275
}
12701276
}

0 commit comments

Comments
 (0)