This commit is contained in:
Maxime Beauchemin 2015-05-14 16:33:13 -07:00
Родитель 6fc5c86a79
Коммит e96ceb7860
3 изменённых файлов: 14 добавлений и 7 удалений

Просмотреть файл

@ -1,7 +1,7 @@
TODO
-----
#### UI
* Run / backfill wizard
* Run button / backfill wizard
* Add templating to adhoc queries
* Charts: better error handling
@ -15,6 +15,7 @@ TODO
* Merge Cascading
#### Backend
* Add a run_only_latest flag to BaseOperator, runs only most recent task instance where deps are met
* Pickle all the THINGS!
* Master auto dag refresh at time intervals
* Prevent timezone chagne on import

Просмотреть файл

@ -337,10 +337,17 @@ class SchedulerJob(BaseJob):
i = 0
while (not self.test_mode) or i < 1:
i += 1
if i % self.refresh_dags_every == 0:
dagbag = models.DagBag(self.subdir, sync_to_db=True)
else:
dagbag.collect_dags(only_if_updated=True)
try:
if i % self.refresh_dags_every == 0:
dagbag = models.DagBag(self.subdir, sync_to_db=True)
else:
dagbag.collect_dags(only_if_updated=True)
except:
logging.error("Failed at reloading the dagbag")
if statsd:
statsd.incr('dag_refresh_error', 1, 1)
sleep(5)
if dag_id:
dags = [dagbag.dags[dag_id]]
else:

Просмотреть файл

@ -181,6 +181,7 @@ def dag_link(v, c, m, p):
class DagModelView(SuperUserMixin, ModelView):
column_list = ('dag_id', 'owners')
column_editable_list = ('is_paused',)
form_excluded_columns = ('is_subdag', 'is_active')
column_searchable_list = ('dag_id',)
column_filters = (
'dag_id', 'owners', 'is_paused', 'is_active', 'is_subdag',
@ -193,8 +194,6 @@ class DagModelView(SuperUserMixin, ModelView):
'last_loaded': {'disabled': True},
'last_expired': {'disabled': True},
'pickle_size': {'disabled': True},
'is_subdag': {'disabled': True},
'is_active': {'disabled': True},
'scheduler_lock': {'disabled': True},
'owners': {'disabled': True},
}