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

Commit 8422b8d

Browse files
committed
Adding crawl-immediate. Will default to true.
1 parent e8fb294 commit 8422b8d

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
@@ -15,6 +15,8 @@
1515
public class GSAContentItem {
1616

1717
protected String url = "";
18+
//Set to true because why would you not want the GSA to immediately crawl?
19+
protected boolean crawlImmediately = true;
1820
protected String display_url = "";
1921
protected String mimetype = "";
2022
protected String content = "";
@@ -35,6 +37,16 @@ public String getUrl()
3537
return url;
3638
}
3739

40+
public boolean isCrawlImmediately()
41+
{
42+
return crawlImmediately;
43+
}
44+
45+
public void setCrawlImmediately(boolean crawlImmediately)
46+
{
47+
this.crawlImmediately = crawlImmediately;
48+
}
49+
3850
public void setDisplayUrl(String newDisplayUrl) {
3951
display_url = newDisplayUrl;
4052
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ public void AddRecord(GSAContentItem item) {
156156
if (item.getHasLastModified()) {
157157
recordNode.setAttribute("last-modified", item.getLastModifiedUTC());
158158
}
159+
160+
if (item.isCrawlImmediately()) {
161+
recordNode.setAttribute("crawl-immediately", "true" );
162+
} else {
163+
recordNode.setAttribute("crawl-immediately", "false" );
164+
}
165+
166+
159167

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

0 commit comments

Comments
 (0)