You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This deletes logs of hanged spiders.
When a spider hangs, it stops updating its log's mtime
and its log can be soon deleted by this code.
On windows, it should even crash because it doesn't allow open files to be deleted.
psutil can be used to check if the file is still open.
It is already being discussed as an optional dependency in scrapy (scrapy/scrapy#1329)
There is also a race condition between to_delete = sorted(...) and os.remove().
If something else removes the file, it will break. ENOENT should be ignored.
The text was updated successfully, but these errors were encountered:
This is a bit of a [WIP] issue because there are more details to be added when I have the time
environ.py has the code responsible for deleting logfiles.
This deletes logs of hanged spiders.
When a spider hangs, it stops updating its log's mtime
and its log can be soon deleted by this code.
On windows, it should even crash because it doesn't allow open files to be deleted.
psutil can be used to check if the file is still open.
It is already being discussed as an optional dependency in scrapy (scrapy/scrapy#1329)
There is also a race condition between
to_delete = sorted(...)
andos.remove()
.If something else removes the file, it will break. ENOENT should be ignored.
The text was updated successfully, but these errors were encountered: