option to perform a full sync
This commit is contained in:
parent
83dc4405bf
commit
da34e00365
|
@ -43,6 +43,9 @@ def main(args):
|
|||
num_folders_to_sync = len(mail.folder_structure)
|
||||
logger.info(f'Syncing {num_folders_to_sync} folders...')
|
||||
|
||||
if args.full:
|
||||
last_refresh = None
|
||||
else:
|
||||
last_refresh = database.have_we_done_a_full_sync_at_all()
|
||||
last_refresh_imap_date = None
|
||||
if last_refresh:
|
||||
|
@ -81,5 +84,6 @@ def main(args):
|
|||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(description='Sync and archive your IMAP server.')
|
||||
parser.add_argument('--config', default='config.yml', help='Path to config file.')
|
||||
parser.add_argument('--full', action='store_true', help='Perform a full sync.')
|
||||
args = parser.parse_args()
|
||||
main(args)
|
||||
|
|
Loading…
Reference in New Issue