Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assess canister_heartbeat as polling mechanism #3

Closed
jorgenbuilder opened this issue Aug 31, 2021 · 3 comments
Closed

Assess canister_heartbeat as polling mechanism #3

jorgenbuilder opened this issue Aug 31, 2021 · 3 comments
Assignees
Labels
help wanted Extra attention is needed motoko

Comments

@jorgenbuilder
Copy link
Collaborator

jorgenbuilder commented Aug 31, 2021

We need to know if heartbeat will work for polling game canisters every minute or couple of minutes. Technical doc.

@jorgenbuilder
Copy link
Collaborator Author

This test doesn't seem to do anything at all. Perhaps local replica doesn't have the functionality, or perhaps heartbeat doesn't at all do what I think it does.

import Debug "mo:base/Debug";

actor {
    public shared func canister_heartbeat () : async () {
        Debug.print("bumbum");
    };
};

@jorgenbuilder
Copy link
Collaborator Author

jorgenbuilder commented Aug 31, 2021

This forum post shares some additional details on heartbeat (and a library to help out with crons!) https://forum.dfinity.org/t/ic-cron-lets-schedule-some-tasks-bois/6506/11

Information is quite scarce. Dfinity confirmed that the invocation of the heartbeat happens in a closed source repo.

@jorgenbuilder jorgenbuilder self-assigned this Sep 1, 2021
@jorgenbuilder
Copy link
Collaborator Author

Motoko doesn't support heartbeat yet. There's a chance that it does in time for the hackathon, but this implementation uses our frontends for the heartbeat invocation: https://github.com/jorgenbuilder/heartbeat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed motoko
Development

No branches or pull requests

1 participant