2021-08-27 18:05:21 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*-coding:UTF-8 -*
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2022-11-23 11:02:33 +01:00
|
|
|
sys.path.append(os.environ['AIL_HOME'])
|
|
|
|
##################################
|
|
|
|
# Import Project packages
|
|
|
|
##################################
|
|
|
|
from update.bin.old_ail_updater import AIL_Updater
|
|
|
|
from lib import Tracker
|
2021-08-27 18:05:21 +02:00
|
|
|
|
|
|
|
class Updater(AIL_Updater):
|
|
|
|
"""default Updater."""
|
|
|
|
|
|
|
|
def __init__(self, version):
|
|
|
|
super(Updater, self).__init__(version)
|
|
|
|
|
|
|
|
def update(self):
|
|
|
|
"""
|
|
|
|
Update Domain Languages
|
|
|
|
"""
|
|
|
|
print('Fixing Tracker_uuid list ...')
|
|
|
|
Tracker.fix_all_tracker_uuid_list()
|
|
|
|
nb = 0
|
2023-05-04 16:35:56 +02:00
|
|
|
for tracker_uuid in Tracker.get_trackers():
|
2021-08-27 18:05:21 +02:00
|
|
|
self.r_serv.sadd('trackers_update_v3.7', tracker_uuid)
|
|
|
|
nb += 1
|
|
|
|
|
|
|
|
self.r_serv.set('update:nb_elem_to_convert', nb)
|
|
|
|
self.r_serv.set('update:nb_elem_converted',0)
|
|
|
|
|
|
|
|
# Add background update
|
|
|
|
self.r_serv.sadd('ail:to_update', self.version)
|
|
|
|
|
|
|
|
|
2022-11-23 11:02:33 +01:00
|
|
|
if __name__ == '__main__':
|
2021-08-27 18:05:21 +02:00
|
|
|
updater = Updater('v3.7')
|
|
|
|
updater.run_update()
|