create account

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

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

Viewing a response to: @felixxx/125-steem-developer-bounty-inside-python

· @emrebeyler ·
$2.32
hi @felixxx,

The script looks like too messy to refactor. I can do a complete rewrite in 24 hours for a total 125 STEEM. What do you think about that? I am experienced w/ discord and steem api's.
👍  , , , ,
properties (23)
authoremrebeyler
permlinkre-felixxx-125-steem-developer-bounty-inside-python-20180201t083925925z
categorysteemdev
json_metadata{"tags":["steemdev"],"users":["felixxx"],"app":"steemit/0.1"}
created2018-02-01 08:39:27
last_update2018-02-01 08:39:27
depth1
children7
last_payout2018-02-08 08:39:27
cashout_time1969-12-31 23:59:59
total_payout_value1.748 HBD
curator_payout_value0.567 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length196
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,078,341
net_rshares373,471,403,409
author_curate_reward""
vote details (5)
@ace108 ·
$2.09
Don't know enough Python but totally agree sometimes to clean up the mess takes a longer time than to redesign and rewrite the thing :-)
👍  
properties (23)
authorace108
permlinkre-emrebeyler-re-felixxx-125-steem-developer-bounty-inside-python-20180201t091729382z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2018-02-01 09:17:30
last_update2018-02-01 09:17:30
depth2
children0
last_payout2018-02-08 09:17:30
cashout_time1969-12-31 23:59:59
total_payout_value1.570 HBD
curator_payout_value0.521 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length136
author_reputation1,233,738,170,400,275
root_title"CLOSED: 125 STEEM Developer Bounty Inside [Python]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id34,085,443
net_rshares336,918,492,033
author_curate_reward""
vote details (1)
@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_reputation218,698,764,507,703
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_reputation218,698,764,507,703
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