mirror of
https://github.com/koel/koel.git
synced 2026-04-25 16:56:02 +03:00
[GH-ISSUE #1296] Watcher fails to recognize new files #746
Labels
No labels
Authentication
Dependencies
Documentation
Feature Request
Flac
Help Wanted
Installation/Setup
Integration
Mobile
PR Welcome
Pending Release
Performance
Playlist
S3
Search
Sync
[Pri] Low
[Pri] Normal
[Status] Keep Open
[Status] Needs Author Reply
[Status] Needs Review
[Status] Stale
[Status] Will Implement
[Type] Blessed
[Type] Bug
[Type] Duplicate
[Type] Enhancement
[Type] Help Request
[Type] Question
[Type] Task
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/koel-koel#746
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vitoyucepi on GitHub (Mar 26, 2021).
Original GitHub issue: https://github.com/koel/koel/issues/1296
Describe the bug
If I use
inotifywaitnew files fail to add with errorFailed to synchronized /path/to/file.mp3. Maybe an invalid file?To reproduce
Steps to reproduce the behavior:
cpExpected behavior
New files are added by watcher without errors.
Screenshots
Environment
Additional context
I monitor events
close_write,create,moved_to,deleteandmoved_from.To do this I wrote the function
For other commands like
statandfileit works okFull log
If I add some delay before adding new file everything will be ok.
Maybe this problem exists because I use docker containers or maybe because of tmpfs.
@phanan commented on GitHub (Mar 29, 2021):
TBH I'm not familiar with
inotify-tools's internals, especially not within the Archlinux context. Judging from the log and what you described, looks like the event is fired before the file handler is closed, hence the issue. If a short delay fixes the issue for you, I'd suggest going with that.@vitoyucepi commented on GitHub (Mar 29, 2021):
I've already created container images for that purpose.
They use php-apache based on ubuntu.
Will it be easy for you to reproduce this issue locally if you use my images. Or maybe you want to build them from the source?
@vitoyucepi commented on GitHub (Mar 30, 2021):
Maybe add some debug message here?
What kind of error.
github.com/koel/koel@0250970de0/app/Services/MediaSyncService.php (L255)Or return
$resultas either. It can be only in one state.okwith value orerrorwith error(s).So in the error dispatcher we can check error type and do some logging.