mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-07-02 14:04:16 +00:00
Allow users to specify min/max valid pastie sizes.
This commit is contained in:
parent
79e82e2489
commit
3c10d624e3
6 changed files with 31 additions and 7 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <sstream>
|
||||
#include <functional>
|
||||
#include <boost/optional.hpp>
|
||||
#include <cstdint>
|
||||
|
||||
namespace tawashi {
|
||||
namespace {
|
||||
|
@ -135,7 +136,7 @@ namespace tawashi {
|
|||
if (m_redis) {
|
||||
m_redis->wait_for_connect();
|
||||
auto batch = m_redis->make_batch();
|
||||
batch.select(m_settings->as<int>("redis_db"));
|
||||
batch.select(m_settings->as<uint32_t>("redis_db"));
|
||||
batch.client_setname("tawashi_v" STRINGIZE(VERSION_MAJOR) "." STRINGIZE(VERSION_MINOR) "." STRINGIZE(VERSION_PATCH));
|
||||
batch.throw_if_failed();
|
||||
}
|
||||
|
@ -198,4 +199,9 @@ namespace tawashi {
|
|||
assert(m_redis);
|
||||
return *m_redis;
|
||||
}
|
||||
|
||||
const SettingsBag& Response::settings() const {
|
||||
assert(m_settings);
|
||||
return *m_settings;
|
||||
}
|
||||
} //namespace tawashi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue