Skip to content

Commit

Permalink
Merge pull request #633 from dfinity-berestovskyy/andriy/update-perio…
Browse files Browse the repository at this point in the history
…dic-tasks

Update `rust/periodic_tasks` example
  • Loading branch information
sesi200 authored Dec 8, 2023
2 parents 81e3e53 + caf0b88 commit f69d8aa
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/rust-periodic_tasks-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Provision Darwin
env:
DFX_VERSION: 0.13.1
run: bash .github/workflows/provision-darwin.sh
run: DFX_VERSION="0.15.2" bash .github/workflows/provision-darwin.sh
- name: Rust Periodic Tasks Darwin
run: |
dfx start --background
Expand All @@ -32,9 +30,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Provision Linux
env:
DFX_VERSION: 0.13.1
run: bash .github/workflows/provision-linux.sh
run: DFX_VERSION="0.15.2" bash .github/workflows/provision-linux.sh
- name: Rust Periodic Tasks Linux
run: |
dfx start --background
Expand Down
4 changes: 2 additions & 2 deletions rust/periodic_tasks/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/periodic_tasks/dfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
}
},
"version": 1
}
}
8 changes: 4 additions & 4 deletions rust/periodic_tasks/heartbeat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
edition = "2021"
name = "heartbeat"
version = "1.0.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
candid = "0.10.0"
ic-cdk = "0.12.0"
ic-cdk-macros = "0.8.2"
candid = "0.10"
ic-cdk = "0.12"
ic-cdk-macros = "0.8"
10 changes: 5 additions & 5 deletions rust/periodic_tasks/heartbeat/heartbeat.did
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
service : (nat64) -> {
"counter": () -> (nat32) query;
"set_interval_secs": (nat64) -> ();
"stop": () -> ();
"cycles_used": () -> (nat64) query;
}
"counter" : () -> (nat32) query;
"set_interval_secs" : (nat64) -> ();
"stop" : () -> ();
"cycles_used" : () -> (nat64) query;
};
4 changes: 4 additions & 0 deletions rust/periodic_tasks/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "1.74"
targets = ["wasm32-unknown-unknown"]
components = ["rustfmt", "clippy"]
10 changes: 5 additions & 5 deletions rust/periodic_tasks/timer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
edition = "2021"
name = "timer"
version = "1.0.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
candid = "0.10.0"
candid = "0.10"
# Base Rust CDK crate provides support for heartbeats only.
ic-cdk = "0.12.0"
ic-cdk = "0.12"
# The timers library is required for multiple and periodic timers.
ic-cdk-timers = "0.6.0"
ic-cdk-macros = "0.8.2"
ic-cdk-macros = "0.8"
ic-cdk-timers = "0.6"
10 changes: 5 additions & 5 deletions rust/periodic_tasks/timer/timer.did
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
service : (nat64) -> {
"counter": () -> (nat32) query;
"start_with_interval_secs": (nat64) -> ();
"stop": () -> ();
"cycles_used": () -> (nat64) query;
}
"counter" : () -> (nat32) query;
"start_with_interval_secs" : (nat64) -> ();
"stop" : () -> ();
"cycles_used" : () -> (nat64) query;
};

0 comments on commit f69d8aa

Please sign in to comment.