Add some log for debugging
This commit is contained in:
		
							parent
							
								
									350310c4c2
								
							
						
					
					
						commit
						c62a16ae64
					
				| 
						 | 
					@ -291,12 +291,15 @@ export default abstract class Chart<T extends Record<string, any>> {
 | 
				
			||||||
				date: Chart.dateToTimestamp(current),
 | 
									date: Chart.dateToTimestamp(current),
 | 
				
			||||||
				...Chart.convertObjectToFlattenColumns(data)
 | 
									...Chart.convertObjectToFlattenColumns(data)
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								logger.info(`${this.name}: New commit created`);
 | 
				
			||||||
		} catch (e) {
 | 
							} catch (e) {
 | 
				
			||||||
			// duplicate key error
 | 
								// duplicate key error
 | 
				
			||||||
			// 並列動作している他のチャートエンジンプロセスと処理が重なる場合がある
 | 
								// 並列動作している他のチャートエンジンプロセスと処理が重なる場合がある
 | 
				
			||||||
			// その場合は再度最も新しいログを持ってくる
 | 
								// その場合は再度最も新しいログを持ってくる
 | 
				
			||||||
			if (isDuplicateKeyValueError(e)) {
 | 
								if (isDuplicateKeyValueError(e)) {
 | 
				
			||||||
				log = await this.getLatestLog(span, group) as Log;
 | 
									log = await this.getLatestLog(span, group) as Log;
 | 
				
			||||||
 | 
									logger.info(`${this.name}: Commit duplicated`);
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				logger.error(e);
 | 
									logger.error(e);
 | 
				
			||||||
				throw e;
 | 
									throw e;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue