Skip to content

Commit

Permalink
Back to schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
olrafa committed Oct 31, 2023
1 parent 9578735 commit 38bddff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Scheduled Scraper

on:
push:
branches:
- main
schedule:
- cron: "0 */6 * * *"

jobs:
build:
Expand Down
4 changes: 2 additions & 2 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const scrapeWebsiteForTerm = async (mediaOutlet, url, searchTerm) => {

if (itemFound) {
console.log(`${searchTerm} found on ${mediaOutlet}.`);
/* await new Promise((resolve, reject) => {
await new Promise((resolve, reject) => {
client.query(
"INSERT INTO mentions (searchTerm, site) VALUES ($1, $2)",
[searchTerm, mediaOutlet],
Expand All @@ -34,7 +34,7 @@ const scrapeWebsiteForTerm = async (mediaOutlet, url, searchTerm) => {
}
}
);
}); */
});
} else {
console.log(`${searchTerm} not found on ${mediaOutlet}.`);
}
Expand Down

0 comments on commit 38bddff

Please sign in to comment.