Skip to content

Commit

Permalink
Changed featured to 120 seconds.
Browse files Browse the repository at this point in the history
  • Loading branch information
chandler767 committed Mar 27, 2020
1 parent 1b200ab commit 9f2c4ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pn-functions/happy-filter/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ export default (request) => {
return new RequestSigner(request, credentials).sign()
}

const cycleDuration = 30; // How often to change the featured post
const cycleDuration = 180; // How often to change the featured post
const resetVoteAvg = 86400; // How often to reset the vote average
const currentTime = Math.round(Date.now() / 1000);
return kvstore.get('post_queue').then((value) => {
Expand Down Expand Up @@ -348,7 +348,7 @@ export default (request) => {
console.log(sentiment);
if (sentiment.Sentiment == "POSITIVE") { // Swap staged posts and publish
pubnub.publish({ message: payload, channel: "news_stream_positive" }); // Publish to positive feed.
const featured_vote_id = utils.randomInt(10000000, 100000000000).toString();
const featured_vote_id = utils.randomInt(9999999999, 999999999999999).toString();
const new_featured = {
"published": currentTime, //let the frontend know when to cycle posts.
"cycle": cycleDuration,
Expand Down

0 comments on commit 9f2c4ab

Please sign in to comment.