Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 7598960

Browse files
committed
Merge pull request #2 from mcplusa/feature/add_crawl_immediately
Adding crawl-immediate. Will default to true.
2 parents cc67201 + 8422b8d commit 7598960

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

src/com/mcplusa/google/feeder/GSAContentItem.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
public class GSAContentItem {
1111

1212
protected String url = "";
13+
//Set to true because why would you not want the GSA to immediately crawl?
14+
protected boolean crawlImmediately = true;
1315
protected String display_url = "";
1416
protected String mimetype = "";
1517
protected String content = "";
@@ -30,6 +32,16 @@ public String getUrl()
3032
return url;
3133
}
3234

35+
public boolean isCrawlImmediately()
36+
{
37+
return crawlImmediately;
38+
}
39+
40+
public void setCrawlImmediately(boolean crawlImmediately)
41+
{
42+
this.crawlImmediately = crawlImmediately;
43+
}
44+
3345
public void setDisplayUrl(String newDisplayUrl) {
3446
display_url = newDisplayUrl;
3547
}

src/com/mcplusa/google/feeder/GSAFeed.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,14 @@ public void AddRecord(GSAContentItem item) {
151151
if (item.getHasLastModified()) {
152152
recordNode.setAttribute("last-modified", item.getLastModifiedUTC());
153153
}
154+
155+
if (item.isCrawlImmediately()) {
156+
recordNode.setAttribute("crawl-immediately", "true" );
157+
} else {
158+
recordNode.setAttribute("crawl-immediately", "false" );
159+
}
160+
161+
154162

155163
recordNode.setAttribute("authmethod", item.getAuthMethod());
156164
if (item.getAcl() != null) {

0 commit comments

Comments
 (0)