Fetching all 1UP-able Utopian posts in a routine

in #utopian-io7 years ago (edited)

image.png

Last improvement of the Utopian bot was a serious hit to 1UP. Indeed, upvotes happen right after moderation, and therefore do not leave time to vote for the contributions on 1UP.

All Utopian posts will soon be 1UP-able, before moderation if they correspond to the criteria below:

  • The post user utopian-io tag
  • The post as utopian.pay as beneficiary (to prove that it's posted through the platform)
  • The post is less than 7 days old (obviously)
  • The post has not been flagged
  • The post has not been upvoted by utopian-io yet

New Features

This iteration was in charge to fetch all those posts from Utopian and make sure they correspond to the features listed above. Sadly the Utopian API that you can find here does not allow to get the posts that haven't been moderated yet.

So I had to fetch it all in our own database using the following flow :

  • Fetch the 100 latest posts using the utopian-io tag using steem.js
  • If they correspond to all the parameters listed above, add them to the database using Parse
  • When finding a post that is already in the database or older than 7 days, stop the process

This will be run in a cronjob launching every 10 minutes.

So far, 399 posts correspond to these conditions for this week.

Future work

  • Another cronjob will have to fetch and destroy the posts that are no longer votable
  • A new tab will appear in the front-end where these posts will be displayed, possibly by categories, for users to find them as easily as possible and upvote them directly
  • Penalty system will be implemented to prevent abuse now that unmoderated posts are 1UP-able.

1UP will rise again!

@stoodkev for @utopian-1up



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  
1UP will rise again!

Woohoo! Amazing work like always. 1UP will become so much more! :)

Thanks, thats really nice feature of 1UP
Cheers mate @stoodkev

Good job @stoodkev the 1UP will definitely help in rewarding contributors more than utopian bot, i hope 1UP will soon be feasible on mobile

The post has not been flagged

I'm very concerned if this is something that should be influencing the voting of Utopian-1UP. Someone could just walk through all the newer posts and flag them with a small percentage. Or do you mean if it has been flagged below 0?

I meant rejected by utopian moderators. It's called flagged in the metadata, but indeed it was confusing. I'm not talking abt downvotes don't worry

That makes way more sense. XD Thank you for the explanation

Thank you for the contribution. It has been approved.

You can contact us on Discord.

[utopian-moderator]

Hey @stoodkev I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.26
TRX 0.20
JST 0.038
BTC 96558.27
ETH 3605.35
USDT 1.00
SBD 3.87