19 Commits

Author SHA1 Message Date
e791682e4c fix(handler): improve error messages in downloadFile function 2024-10-23 02:37:43 +08:00
0a36dd5284 refactor(handler): streamline file streaming and improve concurrency handling 2024-10-23 02:05:47 +08:00
85e0534523 chore(Dockerfile): Update Dockerfile to use Alpine Linux and refactor package management
Update Dockerfile to use Alpine Linux for base image and refactor package management to use apk instead of apt. Also, clean up cache directories after installing packages.
2024-10-23 01:16:23 +08:00
8381e24fc4 feat(handler, schedule): improve error handling and logging for file downloads and cleanup 2024-10-22 23:52:57 +08:00
c5ed3a1fea feat(encoder): add ProcessAndSaveImage function to handle image processing and saving 2024-10-22 22:36:58 +08:00
c8f3d0bf38 进一步优化日志 2024-10-22 19:32:22 +08:00
c9cb32b0da 尝试优化内存占用
feat(encoder): optimize prefetch images with worker pool and progress bar
refactor(handler): improve downloadFile function with error handling
refactor(helper): use streaming JSON encoder for metadata
chore(webp-server): update server config with write buffer size
2024-10-22 17:26:43 +08:00
9ee97eab9d refactor(config, handler): Update error messages and logging to Chinese 2024-10-22 17:05:33 +08:00
2044d8388a 改进文件变更检测逻辑,增加文件大小和最后修改时间检查,优化日志记录 2024-10-07 15:08:52 +08:00
68108a3946 修复了远程请求错误,优化了日志警告信息,并改进了生成默认etag的逻辑。 2024-09-29 12:25:29 +08:00
d976d8f7cb 修复每次都回源, 把默认etag改为静态值 2024-09-29 03:21:26 +08:00
9629b19b9a 导入time 2024-09-29 00:13:41 +08:00
e7c6fe9851 这个修改版本的 pingURL 函数有以下改进:
如果无法获取 ETag,尝试使用 Last-Modified 头部信息。
如果 ETag 和 Last-Modified 都不可用,使用一个基于 URL 和当前时间的回退标识符。
在出现错误或意外状态码时,也使用回退标识符。
增加了更详细的日志记录,有助于问题诊断。
2024-09-29 00:09:18 +08:00
Nova Kwok
89ea0affa3
Add MAX_CACHE_SIZE config (#344)
* Add MAX_CACHE_SIZE

* Bump actions version

* Optimize code

* Use Ticker to control GC loop
2024-06-29 16:42:00 +08:00
HolgerHuo
123c96dde7
add: cache for remote images (#310)
* add: cache for remote image requests

* update: use default expiration for NoExpiration setting

* update: clean code

* fix: do not save empty etag

* fix: panic during type assertion
2024-02-11 10:55:23 +08:00
HolgerHuo
0d4856c4b1
fix: metadata not updated when remote file changes (#297) 2023-11-23 16:38:50 +08:00
BugFest
4003b03022
Multiple backends support (#207)
* Fix: h2non/filetype upgraded to support avif signatures

* Fix: make clean updated to include test/output dirs

* Feature: multi-backend support via IMG_MAP config key as described in #217

* feat: implement both local and remote (proxyMode) mappings for multi-backend

* Feature: multi-backend support via IMG_MAP config key as described in #217

* fix: go-is-svg should be direct import

* fix: imgMap paths are relative to CWD

* feature: IMG_MAP is parsed on start

---------

Co-authored-by: Nova Kwok <n0vad3v@riseup.net>
2023-08-02 23:33:54 +08:00
Benny
a7b5992662
Metadata (#251)
* recover middleware

* simplify Atoi

* metadata data prototype

* InterestingAttention

* resize itself

* Bump version to 0.9.4
Added some comments
Removed String() for Extraparams

* Add metadata test

* Fix CI

* Remove unnecessary tests

* Update file count

* use t.Run to get test case

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-07-11 19:08:32 +02:00
Benny
23bbed8ce6
Refactor review (#220)
* runnable

* convert is working

* some refactoring

* update go.mod

* fix some TODOs

* add TODO

* update go mod

* rebase onto master

* fix #234

2: 5.9s - 7.6MB
4: 26s - 6.9MB

* fix malloc tests

* fix malloc tests

* remote TODO

* add X-Real-IP #236

* Better localRawImagePath

* remove some wrong comments

* Bump version to 0.9.0

---------

Co-authored-by: n0vad3v <n0vad3v@riseup.net>
2023-06-27 15:43:43 +02:00