feat(automation): add scheduled minio memory sync jobs
This commit is contained in:
@@ -864,6 +864,9 @@ describe('configSchema automation', () => {
|
||||
expect(result.automation.daily_briefing.schedule).toBe('0 8 * * *');
|
||||
expect(result.automation.daily_briefing.name).toBe('daily-briefing');
|
||||
expect(result.automation.daily_briefing.dedupe_per_local_day).toBe(true);
|
||||
expect(result.automation.minio_sync.enabled).toBe(false);
|
||||
expect(result.automation.minio_sync.interval).toBe('6h');
|
||||
expect(result.automation.minio_sync.tasks).toEqual([]);
|
||||
});
|
||||
|
||||
it('accepts isolated automation delivery mode', () => {
|
||||
@@ -978,6 +981,44 @@ describe('configSchema automation', () => {
|
||||
expect(result.automation.heartbeat.checks).toContain('backup');
|
||||
expect(result.automation.heartbeat.checks).toContain('provider_errors');
|
||||
});
|
||||
|
||||
it('accepts scheduled minio sync automation config', () => {
|
||||
const result = configSchema.parse({
|
||||
...baseConfig,
|
||||
automation: {
|
||||
minio_sync: {
|
||||
enabled: true,
|
||||
interval: '3h',
|
||||
run_on_start: true,
|
||||
notify_on_success: true,
|
||||
notify: { channel: 'telegram', peer: '123' },
|
||||
tasks: [{
|
||||
prefix: 'knowledge/',
|
||||
namespace_base: 'global/knowledge/minio',
|
||||
mode: 'replace',
|
||||
max_objects: 50,
|
||||
max_chars_per_object: 12000,
|
||||
force: true,
|
||||
}],
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(result.automation.minio_sync.enabled).toBe(true);
|
||||
expect(result.automation.minio_sync.interval).toBe('3h');
|
||||
expect(result.automation.minio_sync.run_on_start).toBe(true);
|
||||
expect(result.automation.minio_sync.notify_on_success).toBe(true);
|
||||
expect(result.automation.minio_sync.notify).toEqual({ channel: 'telegram', peer: '123' });
|
||||
expect(result.automation.minio_sync.tasks).toHaveLength(1);
|
||||
expect(result.automation.minio_sync.tasks[0]).toMatchObject({
|
||||
prefix: 'knowledge/',
|
||||
namespace_base: 'global/knowledge/minio',
|
||||
mode: 'replace',
|
||||
max_objects: 50,
|
||||
max_chars_per_object: 12000,
|
||||
force: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('configSchema — intents', () => {
|
||||
|
||||
Reference in New Issue
Block a user