mirror of
				https://github.com/Icinga/icinga2.git
				synced 2025-11-03 21:25:56 +01:00 
			
		
		
		
	IDO: Always insert customvar status on heavy config update
This commit is contained in:
		
							parent
							
								
									e9b8fc234b
								
							
						
					
					
						commit
						22c14fd964
					
				@ -111,7 +111,6 @@ void DbObject::SendConfigUpdateHeavy(const Dictionary::Ptr& configFields)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	/* update custom var config and status */
 | 
						/* update custom var config and status */
 | 
				
			||||||
	SendVarsConfigUpdateHeavy();
 | 
						SendVarsConfigUpdateHeavy();
 | 
				
			||||||
	SendVarsStatusUpdate();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* config attributes */
 | 
						/* config attributes */
 | 
				
			||||||
	if (!configFields)
 | 
						if (!configFields)
 | 
				
			||||||
@ -245,6 +244,22 @@ void DbObject::SendVarsConfigUpdateHeavy()
 | 
				
			|||||||
				{ "instance_id", 0 } /* DbConnection class fills in real ID */
 | 
									{ "instance_id", 0 } /* DbConnection class fills in real ID */
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
			queries.emplace_back(std::move(query3));
 | 
								queries.emplace_back(std::move(query3));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								DbQuery query4;
 | 
				
			||||||
 | 
								query4.Table = "customvariablestatus";
 | 
				
			||||||
 | 
								query4.Type = DbQueryInsert;
 | 
				
			||||||
 | 
								query4.Category = DbCatState;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								query4.Fields = new Dictionary({
 | 
				
			||||||
 | 
									{ "varname", kv.first },
 | 
				
			||||||
 | 
									{ "varvalue", value },
 | 
				
			||||||
 | 
									{ "is_json", is_json },
 | 
				
			||||||
 | 
									{ "status_update_time", DbValue::FromTimestamp(Utility::GetTime()) },
 | 
				
			||||||
 | 
									{ "object_id", obj },
 | 
				
			||||||
 | 
									{ "instance_id", 0 } /* DbConnection class fills in real ID */
 | 
				
			||||||
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								queries.emplace_back(std::move(query4));
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user