added database scan function

This commit is contained in:
Moe Fwacky
2021-02-17 01:43:25 -08:00
committed by GitHub
parent 03b091afc6
commit fb57fc4de7

View File

@@ -148,6 +148,17 @@ def generate_daily_schedules(channelsList):
print(output.strip())
rc = process.poll()
os.chdir('../')
def global_database_update():
import Global_DatabaseUpdate
'''process = subprocess.Popen(["python", "-u", "Global_DatabaseUpdate.py"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
while True:
output = process.stdout.readline()
if process.poll() is not None:
break
if output:
print(output.strip())
rc = process.poll()'''
parser = argparse.ArgumentParser(description='Pseudo Channel Controls')
channelsList = get_channels()
@@ -176,6 +187,9 @@ parser.add_argument('-r', '--restart',
parser.add_argument('-g', '--generateschedules',
action='store_true',
help='Generate Daily Schedules for All Channels')
parser.add_argument('-u', '--updatedatabase',
action='store_true',
help='Generate Pseudo Channel Database')
args = parser.parse_args()
@@ -221,4 +235,6 @@ if args.generateschedules:
start_channel(last)
except:
print("GENERATING DAILY SCHEDULES")
generate_daily_schedules(channelsList)
generate_daily_schedules(channelsList)
if args.updatedatabase:
global_database_update()