Sourcecode in Site/objectFunctions.js:
1: function ping() {
2: var title = this.title ? this.title : this.alias;
3:
4: // we're doing it the xml-rpc way
5: // (specs at http://newhome.weblogs.com/directory/11)
6: var xr = new Remote("http://rpc.weblogs.com/RPC2");
7: var ping = xr.weblogUpdates.ping(title, this.href());
8: if (!ping.result)
9: return;
10: var result = new Object();
11: result.error = ping.result.flerror;
12: result.message = ping.result.message;
13:
14: if (result.error)
15: app.log("Error when notifying weblogs.com for updated site \"" + this.alias + "\": " + result.message);
16:
17: // lastping is always set to now to prevent blogs
18: // hanging in the scheduler if a fatal error occurs
19: this.lastping = new Date();
20: return result;
21: }
|