Skip to content

Commit

Permalink
Optimize api calls followup (#1435)
Browse files Browse the repository at this point in the history
* Committing any uncommitted changes

* fix: interval and useEffect deps
  • Loading branch information
neo773 authored Feb 20, 2025
1 parent ed6b682 commit 333c819
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions screenpipe-app-tauri/components/pipe-store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -935,11 +935,11 @@ export const PipeStore: React.FC = () => {
// Run check immediately
checkForUpdates();

// Set up interval to check every 5 minutes
const interval = setInterval(checkForUpdates, 5 * 60 * 1000);
// Set up interval to check every 10 seconds actual check is done in the function
const interval = setInterval(checkForUpdates, 10 * 1000);

return () => clearInterval(interval);
}, []);
}, [settings.user.token]);

useEffect(() => {
const setupDeepLink = async () => {
Expand Down
2 changes: 1 addition & 1 deletion screenpipe-app-tauri/src-tauri/Cargo.lock

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

0 comments on commit 333c819

Please sign in to comment.