Skip to content

Commit

Permalink
erdl#119 init_crontab rename orm_lonoa to orm
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-schultz committed Dec 23, 2019
1 parent ce538a6 commit 6b714ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions init_crontab.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import argparse
import orm_lonoa
import orm
import configparser
import crontab
import numpy
Expand Down Expand Up @@ -44,8 +44,8 @@
conn = Session()

# create a list using a database query that selects each unique active script_folder that is not set to None
script_folders = [stype[0] for stype in conn.query(orm_lonoa.SensorInfo.script_folder). \
filter(orm_lonoa.SensorInfo.is_active == True).distinct() if stype[0]]
script_folders = [stype[0] for stype in conn.query(orm.SensorInfo.script_folder). \
filter(orm.SensorInfo.is_active == True).distinct() if stype[0]]
print(__file__ + ': extracted active script folders', str(script_folders), 'from database')

# create a list of the active script filenames to compare with jobs in crontab
Expand All @@ -62,7 +62,7 @@
database_active_scripts.append(script_filename)

# get path of project to check and create lonoa crontab jobs
project_path = conn.query(orm_lonoa.Project.project_folder_path).first()[0]
project_path = conn.query(orm.Project.project_folder_path).first()[0]

# list that will hold lonoa script names already in crontab
crontab_active_scripts = []
Expand Down

0 comments on commit 6b714ed

Please sign in to comment.