[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible MySQL Bug
From: |
Nala Ginrut |
Subject: |
Re: Possible MySQL Bug |
Date: |
Tue, 13 Oct 2020 01:24:49 +0800 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
Sorry for late reply!
Jaft writes:
> Ah; that makes sense. I wasn't sure if Artanis offered a built-in mechanism,
> like Ruby on Rails; thanks for clarifying!
> One thing I had been wondering, previously, is if there's any way to
> store global variables that every file would have access to? I
> remember (way back, though) I tried defining variables in the ENTRY
> file but found that my controllers weren't able to recognize that such
> a variable had been defined.
You may define your globals in lib/ of the app directory, as a
standalone module. To my experience, put all your globals in a specific
module is a common design pattern in Scheme. Usually, I name it env.scm, you may
see a file in this name in almost all my serious projects.
> I'd figure that'd have use if, say, going the hash-table route and then being
> able to access that session data from any, say, controller.
> Is there, also, any way to have Artanis run commands on every quit? I was
> looking at Guile Redis and it dawned on me that quiting Artanis would quit
> without closing the Redis connection; but, if you could set commands to run
> on quit, you could just have Artanis close the connection on every quit that
> way.
Yes, it's (run-when-sigint! proc), the proc is a thunk, say, it's
a nullary function. You may put it to ENTRY.
These hooks are added since last release, so they'll appear in the doc
in next release.
Best regards.
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
signature.asc
Description: PGP signature
- Re: Possible MySQL Bug,
Nala Ginrut <=