Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davidjrice committed Feb 7, 2010
2 parents 2659cd3 + 1a786f1 commit 0d1c6f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions bin/admin_poll_server.js
Expand Up @@ -26,11 +26,11 @@ var
'/'+config.couchDb.db+'/_changes?feed=continuous&heartbeat=30000'
);

// Avoid the http client closing the connection after 60sec
changeClient.setTimeout(0);
// Avoid the http client closing the connection after 60sec
changeClient.setTimeout(0);

http
.createServer(function(req, res) {
http
.createServer(function(req, res) {
var request = new Request(req, res);

if (request.url.pathname !== '/messages') {
Expand Down Expand Up @@ -130,7 +130,7 @@ changeRequest.finish(function(res) {
success: function(doc) {
// Filter out the docs we care about
// we could also use couch's filter docs this, but this is nice & simple
if (doc.type != 'message' || !doc.show ) {
if (doc.type != 'message' || doc.status!="awaiting_response" ) {
// TODO remove doc.show boolean...
return;
}
Expand Down Expand Up @@ -201,4 +201,5 @@ changeRequest.finish(function(res) {
res.addListener('complete', function() {
throw new Error('CouchDB closed /_changes stream on us!');
});
});
});

6 changes: 3 additions & 3 deletions public/admin.html
Expand Up @@ -21,7 +21,7 @@ <h1>Admin</h1>
<thead>
<tr>
<th>Message</th>
<th width="90px">Remove it</th>
<th width="90px">Publish it</th>
<th width="90px">Spam it</th>
</tr>
</thead>
Expand All @@ -34,9 +34,9 @@ <h1>Admin</h1>
<thead>
<tr>
<th>Message</th>
<th width="90px">_id</th>
<!-- <th width="90px">_id</th>
<th width="90px">Status</th>
<th width="90px">Restore it</th>
<th width="90px">Restore it</th> -->
</tr>
</thead>
<tbody id="trashed_messages">
Expand Down

0 comments on commit 0d1c6f5

Please sign in to comment.