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
I have a simple listener that looks for images in a network drive. This is on Windows btw.
listener = Listen.to(PATH, latency: 3, wait_for_delay: 3, only: /\.jpg$/i) do |modified, added, removed|
Log.info("Collecting files...#{added.count}")
Log.info(added, false)
if added.count > 0
#call a function
else
Log.info('No new files found');
end
end
listener.start
sleep
So the path it's listening to, will have folders with a couple hundred jpgs added to it. Sometimes, maybe about one in 10 times, the listener will just get stuck, with the last few files being registered as added over and over again forever. An example log:
I, [2020-09-29T13:08:30.277409 #16056] INFO -- : ["//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110459.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110467.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110471.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110499.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110506.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110536.JPG"]
I, [2020-09-29T13:08:33.345747 #16056] INFO -- : Collecting files...6
I, [2020-09-29T13:08:33.346199 #16056] INFO -- : ["//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110459.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110467.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110471.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110499.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110506.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110536.JPG"]
I, [2020-09-29T13:08:39.256686 #16056] INFO -- : Collecting files...6
I, [2020-09-29T13:08:39.257130 #16056] INFO -- : ["//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110459.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110467.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110471.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110499.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110506.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110536.JPG"]
I, [2020-09-29T13:08:42.410730 #16056] INFO -- : Collecting files...6
I, [2020-09-29T13:08:42.411234 #16056] INFO -- : ["//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110459.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110467.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110471.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110499.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110506.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110536.JPG"]
I, [2020-09-29T13:08:48.277820 #16056] INFO -- : Collecting files...6
I, [2020-09-29T13:08:48.278243 #16056] INFO -- : ["//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110459.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110467.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110471.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110499.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110506.JPG", "//edge-image10/GreenScreen/ftp/testfolder/CFT-E211-0/MH-PT-CFT-E2110536.JPG"]
Just the same last couple files over and over. Only happens sometimes, and only on the network drive, and not my local hard drive, which make me think it has something to do with the type of file system the network uses. Any help is appreciated.
The text was updated successfully, but these errors were encountered:
@SpringsTea Can you try v3.3.0.pre.2 and see if the problem still persists? If so, could you fork the repo and add a bunch of debug logging right in that area to try to figure out why it is spinning? I had to do a similar thing with the linux driver in order to track down bug #481 (although in that case it wasn't spinning, but rather hanging where it wouldn't track changes).
I tried it with 3.1.5 to confirm the issue was still happening, got it to happen on the first try. Then I switched to v3.3.0.pre.2 and tried it three times, with no issues. I'll try it out in production for a while.
I have a simple listener that looks for images in a network drive. This is on Windows btw.
So the path it's listening to, will have folders with a couple hundred jpgs added to it. Sometimes, maybe about one in 10 times, the listener will just get stuck, with the last few files being registered as added over and over again forever. An example log:
Just the same last couple files over and over. Only happens sometimes, and only on the network drive, and not my local hard drive, which make me think it has something to do with the type of file system the network uses. Any help is appreciated.
The text was updated successfully, but these errors were encountered: