You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-24 20:19:10 +02:00
Transcribe: Fixes: Use latest version of joplin/htr-cli available (#12875)
This commit is contained in:
@@ -10,7 +10,7 @@ QUEUE_TTL=900000
|
||||
QUEUE_RETRY_COUNT=2
|
||||
QUEUE_MAINTENANCE_INTERVAL=30000
|
||||
|
||||
HTR_CLI_DOCKER_IMAGE=joplin/htr-cli:0.0.2
|
||||
HTR_CLI_DOCKER_IMAGE=joplin/htr-cli:latest
|
||||
# Fullpath to images folder e.g.:
|
||||
#HTR_CLI_IMAGES_FOLDER=/home/user/joplin/packages/transcribe/images
|
||||
HTR_CLI_IMAGES_FOLDER=
|
||||
|
@@ -6,7 +6,7 @@ export const defaultEnvValues: EnvVariables = {
|
||||
QUEUE_TTL: 15 * Minute,
|
||||
QUEUE_RETRY_COUNT: 2,
|
||||
QUEUE_MAINTENANCE_INTERVAL: 60 * Second,
|
||||
HTR_CLI_DOCKER_IMAGE: 'joplin/htr-cli:0.0.2',
|
||||
HTR_CLI_DOCKER_IMAGE: 'joplin/htr-cli:latest',
|
||||
HTR_CLI_IMAGES_FOLDER: '',
|
||||
QUEUE_DRIVER: 'pg', // 'sqlite'
|
||||
QUEUE_DATABASE_PASSWORD: '',
|
||||
|
@@ -36,7 +36,7 @@ describe('JobProcessor', () => {
|
||||
|
||||
skipByDefault('should execute work on job in the queue', async () => {
|
||||
jest.useRealTimers();
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:0.0.2', join(process.cwd(), 'images')), new FileStorage(), 1000);
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:latest', join(process.cwd(), 'images')), new FileStorage(), 1000);
|
||||
await tw.init();
|
||||
|
||||
await copy(join('images', 'htr_sample.png'), join('images', 'htr_sample_copy.png'));
|
||||
@@ -59,7 +59,7 @@ describe('JobProcessor', () => {
|
||||
|
||||
skipByDefault('should execute work on job in the queue even if one fails', async () => {
|
||||
jest.useRealTimers();
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:0.0.2', join(process.cwd(), 'images')), new FileStorage(), 1000);
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:latest', join(process.cwd(), 'images')), new FileStorage(), 1000);
|
||||
await tw.init();
|
||||
await copy(join('images', 'htr_sample.png'), join('images', 'htr_sample_copy_2.png'));
|
||||
|
||||
@@ -84,7 +84,7 @@ describe('JobProcessor', () => {
|
||||
|
||||
skipByDefault('should remove file sent to queue if job is completed', async () => {
|
||||
jest.useRealTimers();
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:0.0.2', join(process.cwd(), 'images')), new FileStorage(), 1000);
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:latest', join(process.cwd(), 'images')), new FileStorage(), 1000);
|
||||
await tw.init();
|
||||
const imagePath = join('images', 'htr_sample_copy_3.png');
|
||||
await copy(join('images', 'htr_sample.png'), imagePath);
|
||||
@@ -112,7 +112,7 @@ describe('JobProcessor', () => {
|
||||
const fileStorage = new FileStorage();
|
||||
const mockedFileStorageRemove = jest.fn();
|
||||
fileStorage.remove = mockedFileStorageRemove;
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:0.0.2', join(process.cwd(), 'images')), fileStorage, 1000);
|
||||
const tw = new JobProcessor(queue, new HtrCli('joplin/htr-cli:latest', join(process.cwd(), 'images')), fileStorage, 1000);
|
||||
await tw.init();
|
||||
|
||||
// file doesn't exist to force a fail, but the call to remove the file should still exist
|
||||
|
Reference in New Issue
Block a user