Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: If Mover2 fails to move the file, the cached and completed encode is deleted #410

Open
mmenanno opened this issue Apr 9, 2024 · 0 comments
Labels
status:awaiting-triage type:bug Something isn't working

Comments

@mmenanno
Copy link

mmenanno commented Apr 9, 2024

Describe the Bug

If the mover2 plugin fails to move the file, in my example where I encountered this was because of a permissions issue for example. It will deleted the encode that completed successfully, and the encode will still be marked as "success" in the completed queue. Making it that there is no indication of the failure, and the CPU cycles were wasted on the attempt.

Steps to Reproduce

  1. Have a completed folder with permissions that prevent the mover2 plugin from moving a file
  2. Start the encode
  3. Wait for it to complete
  4. The completed file will vanish into the void

Expected Behavior

At the very least I would expect it to go back and mark the completed item as failed, so that there would be an indication that things are failing before unmanic spends a lot of time doing work and then immediately deleting that work.

Ideally it should also short circuit the completed file from being deleted from the cache, and either leave it to be manually moved out, or have a retry button that the user could press.

Screenshots

No response

Relevant Settings

Unmanic is install on unraid via docker. I have it set to write the cache to RAM. My library is setup to pick up files from my /watch directory, encode them to 265, then output to a /completed directory without deleting the source file (thankfully in this cause I didn't also loose the source),

Version

0.2.6~41346cb

Platform

Unraid 6.12.10

Relevant log output

2024-04-09T07:45:21:ERROR:Unmanic.PluginExecutor - [FORMATTED] - Exception while carrying out 'postprocessor.file_move' plugin runner 'mover2'
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/unplugins/executor.py", line 256, in execute_plugin_runner
    runner(data)
  File "/config/.unmanic/plugins/mover2/plugin.py", line 258, in on_postprocessor_file_movement
    directory_info.save()
  File "/usr/local/lib/python3.10/dist-packages/unmanic/libs/directoryinfo.py", line 179, in save
    with open(self.path, 'w') as outfile:
PermissionError: [Errno 13] Permission denied: '/library/watch/Dimension 20/Season 08 - The Unsleeping City Chapter 2/.unmanic'
2024-04-09T07:45:21:INFO:Unmanic.PostProcessor - [FORMATTED] - Removing task cache directory '/tmp/unmanic/unmanic_file_conversion-xhcym-1712461222'
@mmenanno mmenanno added status:awaiting-triage type:bug Something isn't working labels Apr 9, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
status:awaiting-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant