import time
import datetime
from config_isbank import Config
from isbank_reader import reader_service
from isbank_parser import parser_service
from isbank_sender import sender_service


if __name__ == "__main__":
    print("Bank service booted...")
    try:
        reader_service()
        time.sleep(1)
    except Exception as e:
        err = e
        print("Reader Service : ", err)
    try:
        parser_service()
        time.sleep(1)
    except Exception as e:
        err = e
        print("Reader Service : ", err)
    try:
        sender_service()
        time.sleep(1)
    except Exception as e:
        err = e
        print("Reader Service : ", err)
    print(
        datetime.datetime.now().__str__(),
        " : system completed a cycle without error...",
    )
    print("Bank service is completed...")
