announcements: use data path for dev mode
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
863d0c1e4b
commit
3a42dac02b
|
@ -422,9 +422,13 @@ class RssFeed:
|
|||
self.etag: Optional[str] = None
|
||||
self.dev_xml_path: Optional[pathlib.Path] = None
|
||||
if dev_mode:
|
||||
res_dir = pathlib.Path(__file__).parent.parent.parent.resolve()
|
||||
res_path = res_dir.joinpath(".devel/announcement_xml")
|
||||
self.dev_xml_path = res_path.joinpath(self.xml_file)
|
||||
data_path = pathlib.Path(self.server.get_app_arg("data_path"))
|
||||
dev_folder = data_path.joinpath("development/announcements")
|
||||
dev_folder.mkdir(parents=True, exist_ok=True)
|
||||
self.dev_xml_path = dev_folder.joinpath(self.xml_file)
|
||||
logging.info(
|
||||
f"Announcement Feed {name}: Dev XML path set to {self.dev_xml_path}"
|
||||
)
|
||||
|
||||
async def initialize(self) -> None:
|
||||
self.etag = await self.database.get_item(
|
||||
|
|
Loading…
Reference in New Issue