Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

UN_FOLDER_0_DELETE_AFTER not respecting default value if unset #484

Open
lswee opened this issue Aug 18, 2024 · 4 comments
Open

UN_FOLDER_0_DELETE_AFTER not respecting default value if unset #484

lswee opened this issue Aug 18, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lswee
Copy link

lswee commented Aug 18, 2024

I can't seem to get DELETE_ORIGINAL to work, unless I'm misunderstanding its functionality. Should the original .zip be deleted once extraction is successful?

docker-compose.yml - I've just set it to normal folder and as a path within config folder on host for testing:

services:

  unpackerr:
    container_name: unpackerr
    image: ghcr.io/hotio/unpackerr
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=GB
      - UN_FOLDER_0_PATH=/config/watch
      - UN_FOLDER_0_DELETE_ORIGINAL=true
      - UN_FOLDER_0_MOVE_BACK=true
    volumes:
      - ./unpackerr:/config
    restart: unless-stopped

Log showing delete original set to 'true' - note, I've also tried the golift/unpackerr image with the same results:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-perms: starting
s6-rc: info: service init-perms successfully started
s6-rc: info: service init-secrets: starting
s6-rc: info: service init-secrets successfully started
s6-rc: info: service init-setup: starting

 _           _   _
| |__   ___ | |_(_) ___
| '_ \ / _ \| __| |/ _ \
| | | | (_) | |_| | (_) |
|_| |_|\___/ \__|_|\___/

Donate:        https://hotio.dev/donate
Documentation: https://hotio.dev/containers/unpackerr
Support:       https://hotio.dev/discord
Image:         hotio/unpackerr:release
Revision:      9072cf8
Version:       0.14.5
OS:            Linux 6.6.31+rpt-rpi-v8 aarch64

----------------------------------------------------------------------
ENVIRONMENT BASE
----------------------------------------------------------------------
PUID=1000
PGID=1000
UMASK=002
TZ=GB
PRIVOXY_ENABLED=false
UNBOUND_ENABLED=false
VPN_ENABLED=false
----------------------------------------------------------------------

Executing usermod...
usermod: no changes
Applying permissions to /config
s6-rc: info: service init-setup successfully started
s6-rc: info: service init-setup-app: starting

----------------------------------------------------------------------
ENVIRONMENT APP
----------------------------------------------------------------------

----------------------------------------------------------------------

s6-rc: info: service init-setup-app successfully started
s6-rc: info: service init-wireguard: starting
s6-rc: info: service init-wireguard successfully started
s6-rc: info: service service-unpackerr: starting
s6-rc: info: service service-unpackerr successfully started
s6-rc: info: service legacy-services: starting
[INFO] 2024/08/18 13:04:08 Unpackerr v0.14.5- Starting! PID: 144, UID: 1000, GID: 1000, Umask: 2, Now: 2024-08-18 13:04:09 +0100 BST
[ERROR] 2024/08/18 13:04:08 Missing Radarr URL in one of your configurations, skipped and ignored.
[ERROR] 2024/08/18 13:04:08 Missing Sonarr URL in one of your configurations, skipped and ignored.
[INFO] 2024/08/18 13:04:08 ==> GoLift Discord: https://golift.io/discord <==
[INFO] 2024/08/18 13:04:08 ==> Startup Settings <==
[INFO] 2024/08/18 13:04:08  => Using Config File: /config/unpackerr.conf, age: 10 hours 31 mins 25 secs
[INFO] 2024/08/18 13:04:08  => Sonarr Config: 0 servers
[INFO] 2024/08/18 13:04:08  => Radarr Config: 0 servers
[INFO] 2024/08/18 13:04:08  => Lidarr Config: 0 servers
[INFO] 2024/08/18 13:04:08  => Readarr Config: 0 servers
[INFO] 2024/08/18 13:04:08  => Folder Config: 1 path: /config/watch (delete_after:0s, delete_orig:true, log_file:true, move_back:true, isos:false, event_buffer:20000)
[INFO] 2024/08/18 13:04:08  => Parallel: 1
[INFO] 2024/08/18 13:04:08  => Passwords: 0 (rar/7z)
[INFO] 2024/08/18 13:04:08  => Interval: 2m
[INFO] 2024/08/18 13:04:08  => Start/Delete Delay: 1m/5m
[INFO] 2024/08/18 13:04:08  => Retry Delay: 5m, max: 3
[INFO] 2024/08/18 13:04:08  => GUI / StdErr: false / false
[INFO] 2024/08/18 13:04:08  => Debug / Quiet: false / false
[INFO] 2024/08/18 13:04:08  => Activity / Queues: false / 1m
[INFO] 2024/08/18 13:04:08  => Directory & File Modes: 0755 & 0644
[INFO] 2024/08/18 13:04:08  => Webhook Configs: 0 URLs
[INFO] 2024/08/18 13:04:08  => Command Hook Configs: 0 commands
[INFO] 2024/08/18 13:04:08  => Webserver Disabled
[INFO] 2024/08/18 13:04:08 [Folder] Watching (fsnotify): /config/watch
[INFO] 2024/08/18 13:04:08 [Folder] Polling @ 1s: /config/watch
s6-rc: info: service legacy-services successfully started
[INFO] 2024/08/18 13:04:41 [Folder] Tracking New Item: /config/watch/test.zip (event: f CREATE)
[INFO] 2024/08/18 13:05:08 [Unpackerr] Queue: 0 waiting, 0 queued, 0 extracting, 0 extracted, 0 imported, 0 failed, 0 deleted
[INFO] 2024/08/18 13:05:08 [Unpackerr] Totals: 0 retries, 0 finished, 0|0 webhooks, 0|0 cmdhooks, stacks; event:0, hook:0, del:0, up 1 min 10 ms 817 µs
[INFO] 2024/08/18 13:05:43 [Folder] Queued: /config/watch/test.zip, queue size: 1
[INFO] 2024/08/18 13:05:43 [Folder] Extraction Started: /config/watch/test.zip, retries: 0, items in queue: 0
[INFO] 2024/08/18 13:05:43 Deleted (recursively): /config/watch/test.zip_unpackerred
[INFO] 2024/08/18 13:05:43 [Folder] Tracking New Item: /config/watch/test (event: f CREATE)
[INFO] 2024/08/18 13:05:43 [Folder] Extraction Finished: /config/watch/test.zip => elapsed: 0s, archives: 1, extra archives: 0, files extracted: 2, written: 0MiB
[INFO] 2024/08/18 13:05:53 [Folder] Finished, Removed History: /config/watch/test.zip
[INFO] 2024/08/18 13:06:08 [Unpackerr] Queue: 0 waiting, 0 queued, 0 extracting, 0 extracted, 0 imported, 0 failed, 0 deleted
[INFO] 2024/08/18 13:06:08 [Unpackerr] Totals: 0 retries, 1 finished, 0|0 webhooks, 0|0 cmdhooks, stacks; event:0, hook:0, del:0, up 2 mins 10 ms 736 µs
[INFO] 2024/08/18 13:06:43 [Folder] Queued: /config/watch/test, queue size: 1
[INFO] 2024/08/18 13:06:43 [Folder] Nothing Extracted: /config/watch/test: no compressed files found
[INFO] 2024/08/18 13:07:08 [Unpackerr] Queue: 0 waiting, 0 queued, 0 extracting, 0 extracted, 0 imported, 0 failed, 0 deleted
[INFO] 2024/08/18 13:07:08 [Unpackerr] Totals: 0 retries, 1 finished, 0|0 webhooks, 0|0 cmdhooks, stacks; event:0, hook:0, del:0, up 3 mins 11 ms 780 µs

The result:

$ ls unpackerr/watch/
test.zip
$ ls unpackerr/watch/
test  test.zip
$ ls unpackerr/watch/test
test.txt  _unpackerred.test.zip.txt
@bakerboy448
Copy link
Collaborator

Not a bug; working as designed

"delete_after:0s" thus you've disabled delete. https://unpackerr.zip/docs/install/configuration#watch-folders

@bakerboy448 bakerboy448 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 18, 2024
@davidnewhall
Copy link
Collaborator

What baker meant to say is that you should unmount /config so the config file is not used. It's got a setting to disable deletes in it.

@lswee
Copy link
Author

lswee commented Aug 18, 2024

No offence taken @bakerboy448 and thanks @davidnewhall.

I've removed the configuration file, but itt seems that unless I explicitly specify something for UN_FOLDER_0_DELETE_AFTER, it defaults to '0s'.

However, the documentation says that the default is 10m - am I missing something again?

As what I was seeing is the intended logic, but there's understandable confusion, could I please suggest clarifying the documentation? Expanding the note next to DELETE_AFTER to include something like "0s disables deletion even if DELETE_FILES is true" would have certainly avoided me thinking there was an error.

I know I interpreted it wrong, but just to share that I saw "delete after" as being a "delay" option and therefore disabling this delay meant there wouldn't be one, not that the file wouldn't be deleted at all, but that it'd be deleted immediately.

@davidnewhall
Copy link
Collaborator

Confirmed there is a bug where 10m is not being properly set when the variable is not explicit.

@davidnewhall davidnewhall added the bug Something isn't working label Aug 19, 2024
@bakerboy448 bakerboy448 reopened this Aug 19, 2024
@bakerboy448 bakerboy448 changed the title Not Working: UN_FOLDER_0_DELETE_ORIGINAL UN_FOLDER_0_DELETE_AFTER not respecting default value if unset Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

3 participants