Replies: 4 comments 3 replies
-
I just noticed that when I set Also if I start hypnotoad again
then it works. For me it looks like a forking issue or similar. |
Beta Was this translation helpful? Give feedback.
-
Does it help if you use a file-scoped "my $sqlite;" instead of "state $sqlite"? |
Beta Was this translation helpful? Give feedback.
-
Also, always use an absolute path to the database file (with from_filename to make it most simple), use curfile from Mojo::File to make it relative to the script |
Beta Was this translation helpful? Give feedback.
-
Unrelated to the problem, but i only use |
Beta Was this translation helpful? Give feedback.
-
Hi!
I have a simple app which reads from a sqlite database and an app command which simply inserts a row. The inserted row is not shown when I start the app with
hypnotoad
and open the index route.With
morbo
,daemon
andprefork
it works as expected. Whenhypnotoad
is run in foreground mode (-f) it also works.Here is a minimal example:
Steps to reproduce:
Start hypnotoad:
hypnotoad app.pl
Run the insert command:
perl app.pl sql-insert -m production
Open
http://127.0.0.1:3000/
No rows are shown. If you do the same with
hypnotoad -f app.pl
orperl app.pl daemon -l http://*:3000
it works as expected.Without WAL mode
Mojo::SQLite->new('test.sqlite?no_wal=1')
it also works as expected.Beta Was this translation helpful? Give feedback.
All reactions