From 1943a027a81e17a67367ee994c1bb854ba09ce9b Mon Sep 17 00:00:00 2001 From: Cassandra Heart <7929478+CassOnMars@users.noreply.github.com> Date: Thu, 5 Sep 2024 21:18:26 -0500 Subject: [PATCH] chore: increase contact announcement interval (#2296) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Why is this change needed? Reduces the interval from every 30 to every 15 minutes for announcement, with randomized start minute ## Merge Checklist _Choose all relevant options below by adding an `x` now or at any time before submitting for review_ - [x] PR title adheres to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) standard - [x] PR has a [changeset](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#35-adding-changesets) - [x] PR has been tagged with a change label(s) (i.e. documentation, feature, bugfix, or chore) - [ ] PR includes [documentation](https://github.com/farcasterxyz/hub-monorepo/blob/main/CONTRIBUTING.md#32-writing-docs) if necessary. --- ## PR-Codex overview This PR adjusts the announcement interval for contact info in the `@farcaster/hubble` package. ### Detailed summary - Changed the random minute calculation from every 30 minutes to every 15 minutes in `hubble.ts` - Updated the cron syntax for `gossipContactInfoJobScheduler` to reflect the new interval > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` --- .changeset/angry-fans-search.md | 5 +++++ apps/hubble/src/hubble.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/angry-fans-search.md diff --git a/.changeset/angry-fans-search.md b/.changeset/angry-fans-search.md new file mode 100644 index 0000000000..ca24551f76 --- /dev/null +++ b/.changeset/angry-fans-search.md @@ -0,0 +1,5 @@ +--- +"@farcaster/hubble": patch +--- + +chore: adjust announcement interval for contact info diff --git a/apps/hubble/src/hubble.ts b/apps/hubble/src/hubble.ts index f12f4046d2..77dda369fc 100644 --- a/apps/hubble/src/hubble.ts +++ b/apps/hubble/src/hubble.ts @@ -821,8 +821,8 @@ export class Hub implements HubInterface { this.checkFarcasterVersionJobScheduler.start(); this.validateOrRevokeMessagesJobScheduler.start(); - const randomMinute = Math.floor(Math.random() * 30); - this.gossipContactInfoJobScheduler.start(`${randomMinute} */30 * * * *`); // Random minute every 30 minutes + const randomMinute = Math.floor(Math.random() * 15); + this.gossipContactInfoJobScheduler.start(`${randomMinute}-59/15 * * * *`); // Weird syntax but required by cron, random minute every 15 minutes this.checkIncomingPortsJobScheduler.start(); this.measureSyncHealthJobScheduler.start();