Skip to content
This repository has been archived by the owner on May 30, 2018. It is now read-only.

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kyungw00k committed Dec 29, 2010
1 parent 936bc1e commit 206510f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 9 additions & 1 deletion war/WEB-INF/app/actionsChat.js
Expand Up @@ -116,8 +116,16 @@ exports.flush = {
var channel = channelSingleton.fetchFromMemcache();
channel.expireOldSessions();
return Response.json({ message : "ok" });
}
}
};

exports.task = {
POST : function(request) {
taskqueue.add({url:"/chat/task",method:"POST",eta: (new Date().getTime()+(1000*60*30))});
return exports.flush.POST(request);
}
};

exports.reset = function(request) {
var channel = channelSingleton.fetchFromMemcache();
channel.reset();
Expand Down
2 changes: 1 addition & 1 deletion war/WEB-INF/app/config.js
Expand Up @@ -36,4 +36,4 @@ exports.charset = 'UTF-8';
exports.contentType = 'text/html';

var taskqueue = require('google/appengine/api/taskqueue');
taskqueue.add({url:"/chat/flush",method:"POST",countdown:1000});
taskqueue.add({url:"/chat/task",method:"POST"});
3 changes: 1 addition & 2 deletions war/WEB-INF/app/public/js/ringochat.js
Expand Up @@ -118,8 +118,7 @@ $.extend(Channel.prototype, {
}
};
channel.socket.onerror = function() {
alert("Connection Error!");
message.val("Connection Error!").attr("disabled", true);
message.val("Connection Error").attr("disabled", true);
};
channel.socket.onclose = function() {
message.val("Connection Close").attr("disabled", true);
Expand Down

0 comments on commit 206510f

Please sign in to comment.