borgend.py

Sat, 20 Jan 2018 15:08:16 +0000

author
Tuomo Valkonen <tuomov@iki.fi>
date
Sat, 20 Jan 2018 15:08:16 +0000
changeset 8
7b2d2eac6a48
parent 4
d72c4844e791
child 9
aa121291eb0e
permissions
-rwxr-xr-x

basic scheduling

#!/usr/local/bin/python3

import logging

logging.basicConfig(#filename='example.log',
                    format='%(levelname)s:%(message)s',
                    level=logging.DEBUG)

from backup import Backup
from config import settings
from queue import Queue
from ui import BorgendTray


backupconfigs=settings['backups']
backups=[None]*len(backupconfigs);

for i in range(len(backupconfigs)):
    logging.info('Setting up backup set %d' % i)
    backups[i]=Backup(i, backupconfigs[i])

queue=Queue()
#print(backups[0].create(queue))
backups[0].schedule()

#backups[0].join()

if __name__ == "__main__":
    #print(settings)
    BorgendTray("Borgend").run()
    pass

mercurial