#include "fts-storage.h"
#include "fts-indexer.h"
#include "lang-indexer-status.h"
+#include "fts-user.h"
#define INDEXER_SOCKET_NAME "indexer"
#define INDEXER_WAIT_MSECS 250
int fts_indexer_init(struct fts_backend *backend, struct mailbox *box,
struct fts_indexer_context **ctx_r)
{
+ const struct fts_settings *fset = fts_mailbox_get_settings(box);
struct ioloop *prev_ioloop = current_ioloop;
struct fts_indexer_context *ctx;
uint32_t last_uid, seq1, seq2;
- const char *path, *value, *error;
- unsigned int timeout_secs = 0;
+ const char *path;
int ret;
-
- value = mail_user_plugin_getenv(box->storage->user, "fts_index_timeout");
- if (value != NULL) {
- if (str_parse_get_interval(value, &timeout_secs, &error) < 0) {
- e_error(box->storage->user->event,
- "Invalid fts_index_timeout setting: %s",
- error);
- return -1;
- }
- }
-
ret = fts_search_get_first_missing_uid(backend, box, &last_uid);
if (ret < 0)
return -1;
ctx->ioloop = io_loop_create();
ctx->connection_list = connection_list_init(&indexer_client_set,
&indexer_client_vfuncs);
- ctx->conn.input_idle_timeout_secs = timeout_secs;
+ ctx->conn.input_idle_timeout_secs = fset->index_timeout;
connection_init_client_unix(ctx->connection_list, &ctx->conn,
path);
ret = connection_client_connect(&ctx->conn);