[Sync] Schedule common provider
This commit is contained in:
1 parent
727791c5e7
commit
c7ea3555c7
3 files changed
+5
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user