handler function invoked when config changes
| 12 | |
| 13 | // handler function invoked when config changes |
| 14 | void reconf_handler(Config_Option_Field type) { |
| 15 | switch (type) |
| 16 | { |
| 17 | //---------------------------------------------------------------------- |
| 18 | // max queued queries |
| 19 | //---------------------------------------------------------------------- |
| 20 | |
| 21 | case Config_MAX_QUEUED_QUERIES: |
| 22 | { |
| 23 | uint64_t max_queued_queries; |
| 24 | bool res = Config_Option_get(type, &max_queued_queries); |
| 25 | ASSERT(res); |
| 26 | ThreadPools_SetMaxPendingWork(max_queued_queries); |
| 27 | } |
| 28 | break; |
| 29 | |
| 30 | //---------------------------------------------------------------------- |
| 31 | // query mem capacity |
| 32 | //---------------------------------------------------------------------- |
| 33 | |
| 34 | case Config_QUERY_MEM_CAPACITY: |
| 35 | { |
| 36 | int64_t query_mem_capacity; |
| 37 | bool res = Config_Option_get(type, &query_mem_capacity); |
| 38 | ASSERT(res); |
| 39 | rm_set_mem_capacity(query_mem_capacity); |
| 40 | } |
| 41 | break; |
| 42 | |
| 43 | case Config_CMD_INFO: |
| 44 | { |
| 45 | bool info_enabled; |
| 46 | bool res = Config_Option_get(type, &info_enabled); |
| 47 | ASSERT(res); |
| 48 | if(info_enabled) { |
| 49 | CronTask_AddStreamFinishedQueries(); |
| 50 | } |
| 51 | } |
| 52 | break; |
| 53 | |
| 54 | //---------------------------------------------------------------------- |
| 55 | // all other options |
| 56 | //---------------------------------------------------------------------- |
| 57 | default: |
| 58 | return; |
| 59 | } |
| 60 | } |
| 61 |
nothing calls this directly
no test coverage detected