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

New: Support automatic scraping periodically #613

Merged
merged 10 commits into from
Nov 10, 2024
Merged

Conversation

brafdlog
Copy link
Owner

@brafdlog brafdlog commented Nov 1, 2024

הוספתי אפשרות בהגדרות להגיד שרוצים שירוץ אוטומטית כל כמה שעות
זה נראה ככה:
Screenshot 2024-11-01 at 22 57 09

כשלוחצים על הפעל זה מאתחל את הטיימר של ההרצה האוטומטית.

Comment on lines 9 to 10
// Clear the interval that scrapes periodically
await stopPeriodicScraping();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this, wrote you on Whatsapp

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this

@brafdlog
Copy link
Owner Author

brafdlog commented Nov 9, 2024

שיניתי את המימוש שיראה את השעה של הריצה ההבאה.
לא ממשק יפה במיוחד, אבל יעשה את העבודה
Screenshot 2024-11-09 at 14 28 02

@@ -67,10 +68,11 @@ export const registerHandlers = () => {
ipcMain.on('scrape', async (event: IpcMainEvent) => {
const config = await getConfig();
const eventSubscriber = new BudgetTrackingEventEmitter();
scrapeAndUpdateOutputVendors(config, eventSubscriber);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@baruchiro we had a bug here, listening to events was set up only after running scrape, and scraping was without await, so there was a race condition on whether or not the first event set would be caught by the onAny handler or not.

@brafdlog brafdlog merged commit d89dd7c into master Nov 10, 2024
10 checks passed
@brafdlog brafdlog deleted the automaticScraping branch November 10, 2024 20:47
Copy link
Contributor

🎉 This PR is included in version 2.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants