mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-21 00:23:22 +00:00
Report all logs from a container's runtime
We add a database table, which holds information about the last timestamp of a log successfully reported to a backend (local or remote). We then use this value to calculate from which point in time to start reporting logs from the container. If this is the first time we've seen a container, we get all logs, and for every log reported we save the timestamp. If it is not the first time we've seen a container, we request all logs since the last reported time, ensuring no interruption of service. Change-type: minor Closes: #937 Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
10
src/migrations/M00004.js
Normal file
10
src/migrations/M00004.js
Normal file
@ -0,0 +1,10 @@
|
||||
exports.up = function(knex) {
|
||||
return knex.schema.createTable('containerLogs', table => {
|
||||
table.string('containerId');
|
||||
table.integer('lastSentTimestamp');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = function(knex, Promise) {
|
||||
return Promise.reject(new Error('Not Implemented'));
|
||||
};
|
Reference in New Issue
Block a user