增加接口for插件:设置自动更新的时间

This commit is contained in:
luoxueyi 2021-11-17 11:14:44 +08:00
parent b9afec468a
commit 93fccf4d90
3 changed files with 11 additions and 0 deletions

1
.gitignore vendored
View File

@ -23,3 +23,4 @@ plugin/moc*
plugin/.qmake.stash
plugin/Makefile
backend/po/kylin-system-updater.pot
plugin/upgrade.pro.user

View File

@ -355,6 +355,16 @@ class UpdateManagerDbusController(dbus.service.Object):
logging.error(str(e))
return False,str(e)
return True,"success"
# 设置自动更新时间
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='s', out_signature='bs')
def SetAutoUpgradePeriod(self, period):
logging.info(COLORMETHOR_PREFIX+'method'+COLORLOG_SUFFIX+' SetAutoUpgradePeriod will be set value %s.'%(period))
try:
self.parent.sqlite3_server.insert_into_display("update_period", period.lower())
except Exception as e:
logging.error(str(e))
return True,"success"
# # dbus接口改变apt下载速度
@dbus.service.method(UPDATER_DBUS_INTERFACE, in_signature='sb', out_signature='s')

Binary file not shown.