Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
3DCoded committed Oct 30, 2024
2 parents fb4601c + ec9747a commit 477edd4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,5 @@ poetry.toml
# LSP config files
pyrightconfig.json

# End of https://www.toptal.com/developers/gitignore/api/macos,linux,python
# End of https://www.toptal.com/developers/gitignore/api/macos,linux,python
.vscode/sftp.json
9 changes: 8 additions & 1 deletion maintain.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,14 @@ def cmd_CHECK_MAINTENANCE(self, gcmd):

cmd_UPDATE_MAINTENANCE_help = 'Update maintenance'
def cmd_UPDATE_MAINTENANCE(self, gcmd):
self.update_db(self.fetch_history())
data = self.fetch_history()

hours = gcmd.get_int('HOURS', -1)
if hours > -1 and hours < self.threshold:
new = self.fetch_history()[self.trigger] - hours
data[self.trigger] = new

self.update_db(data)

def load_config(config):
return Maintenance(config)
Expand Down

0 comments on commit 477edd4

Please sign in to comment.