Skip to content

Commit

Permalink
chore: increase runtime, run more often
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancarriger committed Oct 7, 2016
1 parent df3dda3 commit d647876
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lambda.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ function auth() {
function updateRunUntil() {
return new Promise( (resolve, reject) => {
firebase.database().ref('server/run_info/run_until').transaction( () => {
let runTime = 1000 * 20;
// let runTime = 1000 * 60 * 5;
let runTime = 1000 * 60 * 2;
return moment().valueOf() + runTime;
}, () => {
resolve();
Expand All @@ -60,14 +59,14 @@ function update() {
database.ref('server/run_info/running').transaction( () => {
return true;
}, () => {
// Run every 10 seconds
// Run every 7 seconds
let interval = setInterval( () => {
run().then( finished => {
if (finished) {
resolve();
}
});
}, 10 * 1000);
}, 7 * 1000);
});
} else {
resolve();
Expand Down

0 comments on commit d647876

Please sign in to comment.