-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc1a399c275cbc0bcf6329c8419d6f4f.js
56 lines (56 loc) · 1.75 KB
/
dc1a399c275cbc0bcf6329c8419d6f4f.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*globals just_started,schedule,scheduled,completed,workflow_input,stop,results,waiting_for */
if (just_started) {
schedule("sw-120", {
"activityType": "fetch",
"input": {
"URL": [
"http://www.newyorker.com/feed/news",
"http://www.thebaffler.com/feed/",
"http://www.economist.com/feeds/print-sections/103/special-reports.xml",
"http://www.economist.com/blogs/democracyinamerica/index.xml",
"http://www.economist.com/feeds/print-sections/102/briefings2.xml",
"http://www.rollingstone.com/politics.rss",
"http://harpers.org/feed/",
"http://www.technologyreview.com/stream/rss/",
"http://www.counterpunch.org/feed/",
"http://www.fairobserver.com/feed/"
]
}
});
}
if (!scheduled("_OUTPUT") && completed("sw-119")) {
var params = {
"activityType": "output",
"input": {}
};
params.input["_INPUT"] = results("sw-119")["_OUTPUT"];
schedule("_OUTPUT", params);
}
if (!scheduled("sw-113") && completed("sw-120")) {
var params = {
"activityType": "sort",
"input": {
"KEY": [
{
"field": "pubDate",
"dir": "DESC"
}
]
}
};
params.input["_INPUT"] = results("sw-120")["_OUTPUT"];
schedule("sw-113", params);
}
if (!scheduled("sw-119") && completed("sw-113")) {
var params = {
"activityType": "truncate",
"input": {
"count": "45"
}
};
params.input["_INPUT"] = results("sw-113")["_OUTPUT"];
schedule("sw-119", params);
}
if (completed('_OUTPUT')) {
stop('finished !');
}