问题描述
我们正在尝试将气流用于自定义django项目,并遵循此答案(Django) ORM in airflow - is it possible?的建议。当我们在airflow v1.10.11上实现它时,我们的任务将始终在django设置部分失败,该部分将根据django设置重新配置日志记录。我们将返回的错误看起来像:
let rawRankings = fs.readFileSync('rankings until 07-Sep-2020.json')
let rankings = JSON.parse(rawRankings);
let rankingsNew = {};
// Iterating through each element
rankings.forEach(function(value) {
// This is the name of the object that will group all the values for that date
let newRankName = value.rankYear + "-" + value.rankMonth + "-" + value.rankDay;
// Now I want to check if the object needs to be created or not,but this doesn't work,it always returns "undefined"
if (!rankingsNew[newRankName]) {
// Adding the object to the array since it doesn't exist
// Trying to add this instance to the new object. Push doesn't work either
rankingsNew[newRankName] = [value];
} else {
// Here I would only add the instance to the object since it already exists. Here is the push version for comparison
rankingsNew[newRankName].push(value)
}
});
有人对气流为何/如何检测到日志记录配置的更改然后杀死任务有任何想法吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)