def sync(self, monacoCoind):
golist = monacoCoind.rpc_command('gobject', 'list')
# objects which are removed from the network should be removed from the DB
try:
for purged in self.purged_network_objects(list(golist.keys())):
# SOMEDAY: possible archive step here
purged.delete_instance(recursive=True, delete_nullable=True)
for item in golist.values():
(go, subobj) = self.import_gobject_from_monacoCoind(monacoCoind, item)
except (peewee.InternalError, peewee.OperationalError, peewee.ProgrammingError) as e:
printdbg("Got an error upon import: %s" % e)
评论列表
文章目录