[Sync] Schedule common provider

This commit is contained in:
Roman Timashev committed 2017-10-24 17:28:38 +03:00
1 parent 727791c5e7
commit c7ea3555c7
3 files changed
+5 -4

No files matched your search

+3 -2
View File
@@ -31,8 +31,9 @@ class Schedule(Model):
@staticmethod
async def scan(provider):
documents = provider.type_filter('.', '.yaml')
documents += provider.type_filter('.', '.toml')
scan_dir = settings.dir_schedules
documents = provider.type_filter(scan_dir, '.yaml')
documents += provider.type_filter(scan_dir, '.toml')
documents = [Schedule.read(provider, i) for i in documents]
return documents