Code Monkey home page Code Monkey logo

flibgolite's People

Contributors

freehck avatar vinser avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

freehck

flibgolite's Issues

Option to disable log rotation

Integrated log rotation is a good option, but for some corner cases it would be good to have an option to disable it.
For example if you use /dev/stdout as your log file.

Right now I'm running a docker container with flibgolite, and logs are interrupted every 1-2 days. Restart helps. The only suspicion is log rotation.

database lock while processing books/new

Steps to reproduce:

  1. take a big archive, for example fb2.flibusta.net (just for tests, we don't justify the piracy)
  2. move all the zip files into books/new
  3. wait
<...>
INFO:	2022/07/11 17:23:29 file 550971.fb2 from f.fb2-550756-552903.zip has been added
INFO:	2022/07/11 17:23:30 file 186024.fb2 from f.fb2-185838-188548.zip has been added
INFO:	2022/07/11 17:23:31 Router --->URL: [/opds]
2022/07/11 17:23:33 database is locked (5) (SQLITE_BUSY)
panic: database is locked (5) (SQLITE_BUSY)

goroutine 24 [running]:
log.Panic({0xc000845ad8?, 0xba9070?, 0xc000028020?})
	/usr/local/go/src/log/log.go:385 +0x65
github.com/vinser/flibgolite/pkg/database.(*DB).NewBook(0xc000010890, 0xc000845e60)
	/flibgolite/pkg/database/database.go:50 +0x32b
github.com/vinser/flibgolite/pkg/stock.(*Handler).indexFB2Zip(0xc0003c9ec0, {0xc000292e40, 0x31})
	/flibgolite/pkg/stock/stock.go:275 +0xc25
github.com/vinser/flibgolite/pkg/stock.(*Handler).ScanDir.func1()
	/flibgolite/pkg/stock/stock.go:107 +0x45
created by github.com/vinser/flibgolite/pkg/stock.(*Handler).ScanDir
	/flibgolite/pkg/stock/stock.go:106 +0x852

Restart helps

Fatal error when list book by genres

Got this:

INFO:   2022/07/23 09:41:38 Router --->URL: [/opds/genres?code=sf_action]
2022/07/23 09:41:38 sql: Scan error on column index 4, name "format": destination not a pointer

Error on start

root@OpenWrt:/mnt/sda5/books$ ./flibgolite-linux-arm-6
I: 18:01:39 Service is running unix-systemv.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x5ffc38]

goroutine 20 [running]:
github.com/vinser/flibgolite/pkg/stock.(*Handler).indexFB2Zip(0x165b740, {0x159eaf0, 0x46})
/home/vinser/Dev/flibgolite/pkg/stock/stock.go:279 +0xa0c
github.com/vinser/flibgolite/pkg/stock.(*Handler).ScanDir.func1()
/home/vinser/Dev/flibgolite/pkg/stock/stock.go:109 +0x40
created by github.com/vinser/flibgolite/pkg/stock.(*Handler).ScanDir
/home/vinser/Dev/flibgolite/pkg/stock/stock.go:108 +0x9f0

root@OpenWrt:/mnt/sda5/books$ cat ./logs/scan.log
SERVICE: 2022/10/19 17:59:07 New acquisitions scanning started...
INFO: 2022/10/19 17:59:07 scanning folder /mnt/sda5/torrent/Downloads/Books/Flibusta.Net for new books.../n
DEBUG: 2022/10/19 17:59:07 stock.go:105: zip: f.usr-524141-526015.zip
DEBUG: 2022/10/19 17:59:07 stock.go:251:

File : 524142.pdf
NonUTF8 : false
Modified : 2018-07-02 02:11:34 +0300 +0300
CRC32 : 3177836722
UncompressedSize64 : 26640417

INFO: 2022/10/19 17:59:07 file 524142.pdf from f.usr-524141-526015.zip has unsupported format ".pdf"
DEBUG: 2022/10/19 17:59:07 stock.go:273:

Test OS X service

To test flibgolite on OS X I have no MAC hardware. I hope it will run good :)

Wrong config filename

/flibgolite # ./flibgolite -config
Default config file "./config/flibgolite.yml" was created for customization
/flibgolite # ls ./config/flibgolite.yml
ls: ./config/flibgolite.yml: No such file or directory
/flibgolite # ls config/
config.yml

OpenSearch doesn't work

OpenSearch requests from tested clients like (fbreader and bookreader) can't be issued or don't processed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.