Skip to content

Conversation

@FrilledShark
Copy link
Contributor

@FrilledShark FrilledShark commented Sep 11, 2016

I have created a new version of my feature xDays. I have used this configuration for about a week. I copied the changes made to Github.

I'm not quite sure what I did. The script has evolved a bit since last time I used it. I just tried and tried until it was stable. I havn't observed any issues with it yet.
Feel free to look at it and see if it fits.

Old pull request: #8

FrilledFish added 2 commits September 11, 2016 16:43
I have added xDaysThreshold
I don't know what I did, but this "might" work.
@Evanito
Copy link
Member

Evanito commented Sep 14, 2016

LGTM! 👍

@rnevet
Copy link
Collaborator

rnevet commented Sep 14, 2016

The change in logic is ok, however, documentation and backward compatibility are not taken care of.

@FrilledShark
Copy link
Contributor Author

I will try to fix backward compatibility. Is it ok if I just check if sixtydaythreshold is still present and if it is, use that instead of xdaythreshold?

@rnevet
Copy link
Collaborator

rnevet commented Sep 15, 2016

Yeah that would be perfect, just don't want to break existing configs. If sixtydaythreshold is present use it's value for the xdaythreshold with xdays=60?
Otherwise README also needs to be updated with the new config options.

@FrilledShark
Copy link
Contributor Author

FrilledShark commented Sep 15, 2016

I have tried to fix Backwards compatibility on my own branch. I will not put it on this pull request before I have tested it for bugs.

@FrilledShark
Copy link
Contributor Author

FrilledShark commented Sep 15, 2016

I have tried to make it backwards compatible. It works on my local copy, but try to see if it works.

Copy link
Collaborator

@rnevet rnevet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, the README description should also be updated to x days.

Currently I can't test the changes myself.

@FrilledShark
Copy link
Contributor Author

Done.

lendingbot.py Outdated

#Check if we need a config file at all (If all settings are passed by args, we won't)
if args.apikey and args.apisecret and args.sleeptimeactive and args.sleeptimeinactive and args.mindailyrate and args.maxdailyrate and args.spreadlend and args.gapbottom and args.gaptop and args.sixtydaythreshold:
if args.apikey and args.apisecret and args.sleeptimeactive and args.sleeptimeinactive and args.mindailyrate and args.maxdailyrate and args.spreadlend and args.gapbottom and args.gaptop and args.xdaythreshold and args.xdays:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that sixtydaythreshold will not work as command line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't know what to put there, so I just changed it from sixtydaythreshold to xdays...

Copy link
Collaborator

@rnevet rnevet Sep 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say something like:

... and ((args.xdaythreshold and args.xdays) or args.sixtydaythreshold)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like this right? de313ae

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say yes.

@rnevet
Copy link
Collaborator

rnevet commented Sep 20, 2016

@Evanito, can you test this a bit before we merge it? I won't have access to my dev environment in the upcoming weeks.

@FrilledShark
Copy link
Contributor Author

FrilledShark commented Sep 20, 2016

It was running when I started the pull request. I have 0 problems related to my changes. I have also updated the bot to my newest changes.

@rnevet
Copy link
Collaborator

rnevet commented Sep 20, 2016

That's great, I would like to have 1 more person running it before merging. I would myself but can't at the moment.

Copy link
Member

@Evanito Evanito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me logically.

@Evanito Evanito merged commit 830919e into BitBotFactory:master Sep 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants