-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.aro
More file actions
executable file
·30 lines (22 loc) · 1.05 KB
/
main.aro
File metadata and controls
executable file
·30 lines (22 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
(* ============================================================
ARO Web Crawler - Application Entry Point
Reads CRAWL_URL from environment and starts the crawl process.
============================================================ *)
(Application-Start: Web Crawler) {
Log "Starting Web Crawler..." to the <console>.
(* Read starting URL from environment *)
Extract the <start-url> from the <env: CRAWL_URL>.
Log "Starting URL: ${<start-url>}" to the <console>.
(* Create output directory *)
Create the <output-path> with "./output".
Make the <output-dir> to the <directory: output-path>.
Log "Output directory created" to the <console>.
(* Queue initial URL - Emit blocks until the entire crawl chain completes *)
Emit a <QueueUrl: event> with { url: <start-url>, base: <start-url> }.
Return an <OK: status> for the <startup>.
}
(Application-End: Success) {
Log "🥁 Web Crawler completed!" to the <console>.
Log the <metrics: table> to the <console>.
Return an <OK: status> for the <shutdown>.
}