-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from tasks import run_jjit | ||
import json | ||
|
||
|
||
def main_handler(event, context): | ||
site_id = event.get("site_id") | ||
|
||
if site_id == "jjit": | ||
run_jjit() | ||
else: | ||
return | ||
|
||
return { | ||
"statusCode": 200, | ||
"body": json.dumps(f"Scraping for site {site_id} completed") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,3 @@ def run_jjit(): | |
print("Data saved successfully") | ||
else: | ||
print("Could not send scraped data via API") | ||
|
||
|
||
run_jjit() |