Skip to content

impr: Use boot start hook to call devices on node start#754

Draft
speeddragon wants to merge 4 commits intoimpr/gunfrom
wip/start_hook_cron
Draft

impr: Use boot start hook to call devices on node start#754
speeddragon wants to merge 4 commits intoimpr/gunfrom
wip/start_hook_cron

Conversation

@speeddragon
Copy link
Collaborator

@speeddragon speeddragon commented Mar 16, 2026

The use case is to start dev_cron to call dev_copycat on node start.

  • start hook was created to modify NodeMsg (node config) before the node starts. So this behaviour needed to change a bit to support calling other devices.

Config

{
    "on": {
        "start": [{
            "device": "cron@1.0",
            "path": "every",
            "extra-params": {
                "interval": "10-second",
                "cron-path": "/~copycat@1.0/arweave&from+integer=-1&to+integer=-19"
            },
            "target": "self",
            "hook/result": "ignore"
        }],
        "request": [
            {"device": "rate-limit@1.0"},
            {
                "device": "auth-hook@1.0",
                "path": "request",
                "when": {"keys": ["authorization", "!"]},
                "secret-provider":
                    {
                        "device": "http-auth@1.0",
                        "access-control": { "device": "http-auth@1.0" }
                    }
            },
            {"device": "name@1.0"},
            {"device": "manifest@1.0"},
            {"device": "blacklist@1.0"}
        ]
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant