mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-07 18:24:14 -04:00
Clear failed requests before scanning
This commit is contained in:
parent
c9fcbc8e8f
commit
ae0f55ae9b
@ -41,6 +41,8 @@ class FsScanner:
|
|||||||
logger.info("Starting scan at %s. This may take some time...", path)
|
logger.info("Starting scan at %s. This may take some time...", path)
|
||||||
if self._ignore_pattern:
|
if self._ignore_pattern:
|
||||||
logger.info(f"Applying ignore pattern: {self._ignore_pattern}")
|
logger.info(f"Applying ignore pattern: {self._ignore_pattern}")
|
||||||
|
await self._requests.clear_failed()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
videos = self.walk_fs(path)
|
videos = self.walk_fs(path)
|
||||||
|
|
||||||
|
@ -48,6 +48,14 @@ class RequestCreator:
|
|||||||
)
|
)
|
||||||
_ = await self._database.execute("notify scanner_requests")
|
_ = await self._database.execute("notify scanner_requests")
|
||||||
|
|
||||||
|
async def clear_failed(self):
|
||||||
|
_ = await self._database.execute(
|
||||||
|
"""
|
||||||
|
delete from scanner.requests
|
||||||
|
where status = 'failed'
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class RequestProcessor:
|
class RequestProcessor:
|
||||||
def __init__(
|
def __init__(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user