Skip to content

[Bug] Loop when files are being actively written to and FSNotify triggers #57

Description

@RomeSilvanus

Should check for file activity or if file is open in another process before proceeding with add process

Error message:

2021/10/08 22:43:38 fsnotify event: "files/713.7z": WRITE
2021/10/08 22:43:38 Adding file from files/713.7z to /ipfs-sync/files/713.7z ...
2021/10/08 22:43:38 Generating file headers...
2021/10/08 22:43:38 Doing add request...
2021/10/08 22:43:38 File hash: bafkreih
2021/10/08 22:43:38 Removing existing file (if any)...
2021/10/08 22:43:38 Adding file to mfs path: /ipfs-sync/files/713.7z
2021/10/08 22:43:38 AddFile reply: bafkreih
2021/10/08 22:43:38 fsnotify event: "files/813.7z": WRITE
2021/10/08 22:43:38 Adding file from files/813.7z to /ipfs-sync/files/813.7z ...
2021/10/08 22:43:38 Generating file headers...
2021/10/08 22:43:38 Doing add request...
2021/10/08 22:43:38 File hash: bafkreih
2021/10/08 22:43:38 Removing existing file (if any)...
2021/10/08 22:43:38 Adding file to mfs path: /ipfs-sync/files/813.7z
2021/10/08 22:43:38 AddFile reply: bafkreih
2021/10/08 22:43:38 fsnotify event: "files/713.7z": WRITE
2021/10/08 22:43:38 Adding file from files/713.7z to /ipfs-sync/files/713.7z ...
2021/10/08 22:43:38 Generating file headers...
2021/10/08 22:43:38 Doing add request...
2021/10/08 22:43:38 File hash: bafkreihdw
2021/10/08 22:43:38 Removing existing file (if any)...
2021/10/08 22:43:38 Adding file to mfs path: /ipfs-sync/files/713.7z
2021/10/08 22:43:38 AddFile reply: bafkreih
2021/10/08 22:43:38 fsnotify event: "files/819.7z": WRITE
2021/10/08 22:43:38 Adding file from files/819.7z to /ipfs-sync/files/819.7z ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceStrictly performance related

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions