Skip to content

Commit

Permalink
custom polling interval
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinedc committed Jan 16, 2024
1 parent 0c6ac41 commit 834ab5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.10] - 2024-01-16
### Changed
- Allow custom polling interval

## [0.1.9] - 2024-01-15
### Changed
- Handle Basic auth
Expand Down
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if (!secret) {

const args = process.argv.slice(2);
const workspaceId = args[0];
const pollingInterval = parseInt(args[1]) || 4000;

if (!workspaceId) {
console.log(`Pass the workspace id as an argument. Example: ethernal-cli-light 1`);
Expand Down Expand Up @@ -91,7 +92,7 @@ const main = async () => {

let firstBlock = false;
client.watchBlocks({
pollingInterval: 500,
pollingInterval,
onBlock: async block => {
if (!firstBlock) firstBlock = true;
else {
Expand Down

0 comments on commit 834ab5d

Please sign in to comment.