Provide Redis version
This commit is contained in:
		
							parent
							
								
									2c1932faa7
								
							
						
					
					
						commit
						bd83939993
					
				
					 4 changed files with 8 additions and 0 deletions
				
			
		|  | @ -4,6 +4,7 @@ | ||||||
| 	<p>Machine: {{ meta.machine }}</p> | 	<p>Machine: {{ meta.machine }}</p> | ||||||
| 	<p>Node: {{ meta.node }}</p> | 	<p>Node: {{ meta.node }}</p> | ||||||
| 	<p>PSQL: {{ meta.psql }}</p> | 	<p>PSQL: {{ meta.psql }}</p> | ||||||
|  | 	<p>Redis: {{ meta.redis }}</p> | ||||||
| 	<p>Version: {{ meta.version }} </p> | 	<p>Version: {{ meta.version }} </p> | ||||||
| </div> | </div> | ||||||
| </template> | </template> | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ import * as pkg from '../../../../package.json'; | ||||||
| import { Emojis } from '../../../models'; | import { Emojis } from '../../../models'; | ||||||
| import { types, bool } from '../../../misc/schema'; | import { types, bool } from '../../../misc/schema'; | ||||||
| import { getConnection } from 'typeorm'; | import { getConnection } from 'typeorm'; | ||||||
|  | import redis from '../../../db/redis'; | ||||||
| 
 | 
 | ||||||
| export const meta = { | export const meta = { | ||||||
| 	stability: 'stable', | 	stability: 'stable', | ||||||
|  | @ -116,6 +117,7 @@ export default define(meta, async (ps, me) => { | ||||||
| 		os: os.platform(), | 		os: os.platform(), | ||||||
| 		node: process.version, | 		node: process.version, | ||||||
| 		psql: await getConnection().query('SHOW server_version').then(x => x[0].server_version), | 		psql: await getConnection().query('SHOW server_version').then(x => x[0].server_version), | ||||||
|  | 		redis: redis.server_info.redis_version, | ||||||
| 
 | 
 | ||||||
| 		cpu: { | 		cpu: { | ||||||
| 			model: os.cpus()[0].model, | 			model: os.cpus()[0].model, | ||||||
|  |  | ||||||
|  | @ -21,6 +21,7 @@ import parseAcct from '../../misc/acct/parse'; | ||||||
| import getNoteSummary from '../../misc/get-note-summary'; | import getNoteSummary from '../../misc/get-note-summary'; | ||||||
| import { ensure } from '../../prelude/ensure'; | import { ensure } from '../../prelude/ensure'; | ||||||
| import { getConnection } from 'typeorm'; | import { getConnection } from 'typeorm'; | ||||||
|  | import redis from '../../db/redis'; | ||||||
| 
 | 
 | ||||||
| const client = `${__dirname}/../../client/`; | const client = `${__dirname}/../../client/`; | ||||||
| 
 | 
 | ||||||
|  | @ -252,6 +253,7 @@ router.get('/info', async ctx => { | ||||||
| 		os: os.platform(), | 		os: os.platform(), | ||||||
| 		node: process.version, | 		node: process.version, | ||||||
| 		psql: await getConnection().query('SHOW server_version').then(x => x[0].server_version), | 		psql: await getConnection().query('SHOW server_version').then(x => x[0].server_version), | ||||||
|  | 		redis: redis.server_info.redis_version, | ||||||
| 		cpu: { | 		cpu: { | ||||||
| 			model: os.cpus()[0].model, | 			model: os.cpus()[0].model, | ||||||
| 			cores: os.cpus().length | 			cores: os.cpus().length | ||||||
|  |  | ||||||
|  | @ -88,6 +88,9 @@ html | ||||||
| 				tr | 				tr | ||||||
| 					th PSQL version | 					th PSQL version | ||||||
| 					td= psql | 					td= psql | ||||||
|  | 				tr | ||||||
|  | 					th Redis version | ||||||
|  | 					td= redis | ||||||
| 				tr | 				tr | ||||||
| 					th Machine | 					th Machine | ||||||
| 					td= machine | 					td= machine | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue