Skip to content
This repository was archived by the owner on Jan 16, 2020. It is now read-only.

Commit 75d548d

Browse files
committed
Remove delay before processing a request. Fix early return from git fetch.
1 parent b1a0eca commit 75d548d

2 files changed

Lines changed: 9 additions & 13 deletions

File tree

lib/service/github.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ extend( GithubRepo.prototype, {
158158
function( error ) {
159159
// repo already exists
160160
if ( !error ) {
161-
return exec( "git fetch -t", { cwd: repo.path }, this );
161+
exec( "git fetch -t", { cwd: repo.path }, this );
162+
return;
162163
}
163164

164165
// error other than repo not existing

scripts/update-server.js

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,13 @@ var server = http.createServer(function( request, response ) {
5555

5656
// Process the request
5757
processing[ repo.id ] = true;
58-
// GitHub seems to notify us too soon when there are tags. If we
59-
// immediately check for new tags, the data may not be available yet,
60-
// so we wait a bit before trying to process the request.
61-
setTimeout(function() {
62-
hook.processHook( repo, function( error ) {
63-
delete processing[ repo.id ];
64-
logger.log( "Done processing request: " + repo.id );
65-
if ( error ) {
66-
logger.error( "Error processing hook: " + error.stack );
67-
}
68-
});
69-
}, 60000 );
58+
hook.processHook( repo, function( error ) {
59+
delete processing[ repo.id ];
60+
logger.log( "Done processing request: " + repo.id );
61+
if ( error ) {
62+
logger.error( "Error processing hook: " + error.stack );
63+
}
64+
});
7065
});
7166
});
7267

0 commit comments

Comments
 (0)