create account

RE: CLOSED: 125 STEEM Developer Bounty Inside [Python] by felixxx

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @emrebeyler/re-felixxx-125-steem-developer-bounty-inside-python-20180201t083925925z

· @felixxx ·
I agree, that it really is messy.

If you did a complete redesign, I'd like to plan ahead for some extra features.

I'll just wait for some more replies, to give others a chance - Hope that's ok.
properties (22)
authorfelixxx
permlinkre-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t084506985z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-01 08:45:09
last_update2018-02-01 08:45:09
depth2
children5
last_payout2018-02-08 08:45:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length195
author_reputation217,800,379,578,379
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,079,469
net_rshares0
@emrebeyler ·
$2.31
No problem.

I have a couple of ideas:

- Don't parse every block. Instead use get_account_history for each curator and filter only votes. Much more cleaner code and less overhead. This will remove almost half of the code. 

- Use mongodb to log already sent votes and [check](https://github.com/utopian-io/utopian.tip/blob/master/utopian_tip/utopian_tip.py#L86) from there.

- Use supervisord to restart the bot if bot goes down. Fixing the main reason is the real solution however you can always use Supervisord to auto-restart the process.

- Custom node settings are not valid on some internal classes of steem-python. There are a couple of pull requests waiting for approval about this issue but they didn't do that yet. Using get_account_history with a custom list of nodes working well though. So, this won't be a o problem.

Let me know, if you decide for a rewrite.

my Discord id: emre#9263.
👍  , ,
properties (23)
authoremrebeyler
permlinkre-felixxx-re-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t085732263z
categorysteemdev
json_metadata{"tags":["steemdev"],"links":["https://github.com/utopian-io/utopian.tip/blob/master/utopian_tip/utopian_tip.py#L86"],"app":"steemit/0.1"}
created2018-02-01 08:57:33
last_update2018-02-01 08:57:33
depth3
children4
last_payout2018-02-08 08:57:33
cashout_time1969-12-31 23:59:59
total_payout_value2.244 HBD
curator_payout_value0.070 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length901
author_reputation448,535,049,068,622
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,081,773
net_rshares373,295,077,721
author_curate_reward""
vote details (3)
@felixxx ·
Another feature of the bot ( which now runs as a separate script ) is to drop a comment under posts, when the author has used #deutsch for the first time.

To integrate that I'd need to get all blocks.
properties (22)
authorfelixxx
permlinkre-emrebeyler-re-felixxx-re-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t090508209z
categorysteemdev
json_metadata{"tags":["steemdev","deutsch"],"app":"steemit/0.1"}
created2018-02-01 09:05:09
last_update2018-02-01 09:05:09
depth4
children3
last_payout2018-02-08 09:05:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length201
author_reputation217,800,379,578,379
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,083,134
net_rshares0
@emrebeyler · (edited)
Yes, you will need to listen then. However, I strongly suggest keeping them separate processes. Totally different things. For the sake of "seperation of concerns". They may exist in the same repository but I don't recommend same process.


For the welcome functionality:

```$deutchebot --welcome```

It will listen all blocks and welcome users if they use the tag first time.

For the discord/curate functionality:

```$deutchebot --curate```

It will not listen all blocks, will work with get_account_history.
properties (22)
authoremrebeyler
permlinkre-felixxx-re-emrebeyler-re-felixxx-re-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t091308382z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-01 09:13:09
last_update2018-02-01 09:15:03
depth5
children2
last_payout2018-02-08 09:13:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length511
author_reputation448,535,049,068,622
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,084,619
net_rshares0