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...")
    while True:
        try:
            reader_service()
            time.sleep(1)
            parser_service()
            time.sleep(1)
            sender_service()
            time.sleep(1)
            print(datetime.datetime.now().__str__(), " : system completed a cycle...")
        except Exception as e:
            err = e
            print("Raised Error :", err)
        time.sleep(int(Config.SERVICE_TIMING or 900))
        # time.sleep(10)
