Change notification check on available server

This commit is contained in:
Dryusdan 2020-12-16 18:17:45 +01:00
parent a3d5516e6d
commit a1dcce55d7
1 changed files with 12 additions and 12 deletions

View File

@ -56,20 +56,20 @@ class OVHTracker:
self.db.insertServer( self.db.insertServer(
wantedServer, wantedDatacenter wantedServer, wantedDatacenter
) )
self.db.updateAvailable(
wantedServer, wantedDatacenter, 1
)
self.logger.info(
"{} is available in {}".format(
wantedServer, wantedDatacenter
)
)
if self.db.isNotified( if self.db.isNotified(
wantedServer, wantedDatacenter, 1 wantedServer, wantedDatacenter, 1
): ):
self.logger.info("Already notified") self.logger.info("Already notified")
else: else:
self.db.updateAvailable(
wantedServer, wantedDatacenter, 1
)
self.logger.info(
"{} is available in {}".format(
wantedServer, wantedDatacenter
)
)
refOfServer = Settings().get( refOfServer = Settings().get(
"config/refToName.yml" "config/refToName.yml"
) )
@ -79,9 +79,9 @@ class OVHTracker:
wantedDatacenter, wantedDatacenter,
) )
), ),
self.db.updateNotified( self.db.updateNotified(
wantedServer, wantedDatacenter, 1 wantedServer, wantedDatacenter, 1
) )
else: else:
if self.db.isServerExist( if self.db.isServerExist(
wantedServer, wantedDatacenter wantedServer, wantedDatacenter