Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoupdate using git #623

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Autoupdate using git #623

wants to merge 2 commits into from

Conversation

Evanito
Copy link
Member

@Evanito Evanito commented Apr 6, 2018

Description

  • When ran using the -up argument, will perform a git pull before starting the bot normally.
  • Tried to be user friendly with error messages.
  • Didn't want to reinvent the wheel, so let git pull decide when an update is needed.
  • Requires you to restart the bot to update (using cron or manually)
  • Need to add new arg to docs

Thoughts?:

  • Can probably be changed to autorestart self once per time frame?
  • Allow usage through config instead of arg?? (Config is for accounts imo, args are for the software)

#314

TESTING STAGE

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read CONTRIBUTING.md
  • I fully understand Github Flow.
  • My code adheres to the code style of this project.
  • I have updated the documentation in /docs if I have changed the config, arguments, logic in how the bot works, or anything that understandably needs a documentation change.
  • I have updated the config file accordingly if my change requires a new configuration setting or changes an existing one.
  • I have tested the bot with no issues for 24 continuous hours. If issues were experienced, they have been patched and tested again.

Evanito added 2 commits April 6, 2018 13:45
Can't hide the error, so tell them what it means
@ghost ghost assigned Evanito Apr 6, 2018
@ghost ghost added the Testing Phase label Apr 6, 2018
@Evanito Evanito changed the title Autoupdate Autoupdate using git Apr 6, 2018
@rnevet
Copy link
Collaborator

rnevet commented Apr 11, 2018

I'm not sure if this should be solve as part of the bot code. For example for my setup it wouldn't work as I'm redirecting the outputs and the new cmd will not take those output settings I think.

@Evanito
Copy link
Member Author

Evanito commented Apr 11, 2018

I also already have autoupdating built into my cron job...
This is honestly just a solution for those who don't have advanced setups, still allows users to update another way.

print "Your sudo is not configured for non-interactive usage, this is necessary."
else:
print up_out
cmd = ["python", "lendingbot.py"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe you could use argv instead of rebuilding the request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants