2022-03-07 15:12:01 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*-coding:UTF-8 -*
|
|
|
|
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import sys
|
|
|
|
import time
|
|
|
|
import redis
|
|
|
|
import datetime
|
|
|
|
|
|
|
|
sys.path.append(os.path.join(os.environ['AIL_BIN'], 'lib/'))
|
|
|
|
import ConfigLoader
|
|
|
|
|
|
|
|
sys.path.append(os.path.join(os.environ['AIL_HOME'], 'update', 'bin'))
|
2022-07-08 09:47:47 +02:00
|
|
|
from old_ail_updater import AIL_Updater
|
2022-03-07 15:12:01 +01:00
|
|
|
|
|
|
|
class Updater(AIL_Updater):
|
|
|
|
"""default Updater."""
|
|
|
|
|
|
|
|
def __init__(self, version):
|
|
|
|
super(Updater, self).__init__(version)
|
|
|
|
|
|
|
|
def update(self):
|
2022-03-07 16:37:26 +01:00
|
|
|
r_tracking = redis.StrictRedis( host='localhost',
|
|
|
|
port=6382,
|
2022-03-07 15:54:56 +01:00
|
|
|
db=2,
|
|
|
|
decode_responses=True )
|
2022-03-07 15:12:01 +01:00
|
|
|
|
|
|
|
# FLUSH OLD DB
|
|
|
|
r_tracking.flushdb()
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
|
|
|
updater = Updater('v4.1')
|
|
|
|
|
|
|
|
|
|
|
|
updater.run_update()
|