mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 02:14:33 +00:00
fix: skip heartbeat when HEARTBEAT.md does not exist (#20461)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: f6e5f8172a
Co-authored-by: vikpos <24960005+vikpos@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -51,6 +51,8 @@ async function withHeartbeatFixture(
|
||||
);
|
||||
};
|
||||
|
||||
await fs.writeFile(path.join(tmpDir, "HEARTBEAT.md"), "- Check status\n", "utf-8");
|
||||
|
||||
try {
|
||||
return await run({ tmpDir, storePath, seedSession });
|
||||
} finally {
|
||||
@@ -136,7 +138,7 @@ describe("runHeartbeatOnce – heartbeat model override", () => {
|
||||
});
|
||||
|
||||
it("passes per-agent heartbeat model override (merged with defaults)", async () => {
|
||||
await withHeartbeatFixture(async ({ storePath, seedSession }) => {
|
||||
await withHeartbeatFixture(async ({ tmpDir, storePath, seedSession }) => {
|
||||
const cfg: OpenClawConfig = {
|
||||
agents: {
|
||||
defaults: {
|
||||
@@ -149,6 +151,7 @@ describe("runHeartbeatOnce – heartbeat model override", () => {
|
||||
{ id: "main", default: true },
|
||||
{
|
||||
id: "ops",
|
||||
workspace: tmpDir,
|
||||
heartbeat: {
|
||||
every: "5m",
|
||||
target: "whatsapp",
|
||||
|
||||
Reference in New Issue
Block a user