oldmoe / litestack

MIT License
1.02k stars 56 forks source link

Expected `config/litejob.yml` to be sent through ERb like everything else #102

Closed francois closed 4 months ago

francois commented 5 months ago

I wrote the following config/litejob.yml in the context of a Rails 7.1 application:

path: <%= Litesupport.root("development").join("data.sqlite3") %>
queues:
  - [default, 1]

I was quite surprised to find the following files living in my application's root directoty 30 seconds later!

$ ls -l
total 408
-rw-r--r--   1 francois  staff   4096 Mar 24 22:21 <%= Litesupport.root("development").join("data.sqlite3") %>
-rw-r--r--   1 francois  staff  32768 Mar 24 22:23 <%= Litesupport.root("development").join("data.sqlite3") %>-shm
-rw-r--r--   1 francois  staff  86552 Mar 24 22:24 <%= Litesupport.root("development").join("data.sqlite3") %>-wal
$ bundle show
Gems included by the bundle:
  * litestack (0.4.3)
  * rails (7.1.3.2)
  * sqlite3 (1.7.3)

Incidentally, it isn't mentionned anywhere, but I presume that storing the queue in the same SQLite3 DB file as the application's data isn't a problem, provided I don't create a table called queue. I expect to be able to backup a database file, restore it elsewhere, and scheduled jobs should run whenever I start the main server.

oldmoe commented 4 months ago

This is fixed in HEAD now