You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-10 22:11:50 +02:00
@@ -11,8 +11,9 @@ QUEUE_RETRY_COUNT=2
|
|||||||
QUEUE_MAINTENANCE_INTERVAL=30000
|
QUEUE_MAINTENANCE_INTERVAL=30000
|
||||||
|
|
||||||
HTR_CLI_DOCKER_IMAGE=joplin/htr-cli:0.0.2
|
HTR_CLI_DOCKER_IMAGE=joplin/htr-cli:0.0.2
|
||||||
# Fullpath to images folder
|
# Fullpath to images folder e.g.:
|
||||||
HTR_CLI_IMAGES_FOLDER=/home/user/joplin/packages/transcribe/images
|
#HTR_CLI_IMAGES_FOLDER=/home/user/joplin/packages/transcribe/images
|
||||||
|
HTR_CLI_IMAGES_FOLDER=
|
||||||
|
|
||||||
QUEUE_DRIVER=pg
|
QUEUE_DRIVER=pg
|
||||||
# QUEUE_DRIVER=sqlite
|
# QUEUE_DRIVER=sqlite
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ ! -f "/images/$1" ]; then
|
if [ ! -f "/images/$1" ]; then
|
||||||
echo "Error: Image file /images/$1 does not exist."
|
echo "Error: Image file /images/$1 does not exist. Check if HTR_CLI_IMAGES_FOLDER environment variable is set correctly."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -43,6 +43,7 @@ const init = async () => {
|
|||||||
|
|
||||||
const checkServerConfigurations = (envVariables: EnvVariables) => {
|
const checkServerConfigurations = (envVariables: EnvVariables) => {
|
||||||
if (!envVariables.API_KEY) throw Error('API_KEY environment variable not set.');
|
if (!envVariables.API_KEY) throw Error('API_KEY environment variable not set.');
|
||||||
|
if (!envVariables.HTR_CLI_IMAGES_FOLDER) throw Error('HTR_CLI_IMAGES_FOLDER environment variable not set. This should point to a folder where images will be stored.');
|
||||||
};
|
};
|
||||||
|
|
||||||
const main = async () => {
|
const main = async () => {
|
||||||
|
@@ -6,7 +6,7 @@ export const defaultEnvValues: EnvVariables = {
|
|||||||
QUEUE_RETRY_COUNT: 2,
|
QUEUE_RETRY_COUNT: 2,
|
||||||
QUEUE_MAINTENANCE_INTERVAL: 60000,
|
QUEUE_MAINTENANCE_INTERVAL: 60000,
|
||||||
HTR_CLI_DOCKER_IMAGE: 'joplin/htr-cli:0.0.2',
|
HTR_CLI_DOCKER_IMAGE: 'joplin/htr-cli:0.0.2',
|
||||||
HTR_CLI_IMAGES_FOLDER: '/home/js/joplin/packages/transcribe/images',
|
HTR_CLI_IMAGES_FOLDER: '',
|
||||||
QUEUE_DRIVER: 'pg', // 'sqlite'
|
QUEUE_DRIVER: 'pg', // 'sqlite'
|
||||||
QUEUE_DATABASE_PASSWORD: '',
|
QUEUE_DATABASE_PASSWORD: '',
|
||||||
QUEUE_DATABASE_NAME: '',
|
QUEUE_DATABASE_NAME: '',
|
||||||
|
@@ -54,7 +54,7 @@ export default class JobProcessor {
|
|||||||
try {
|
try {
|
||||||
await this.checkForJobs();
|
await this.checkForJobs();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error(`Error while processing job: ${this.currentJob}`, error);
|
logger.error(`Error while processing job: ${this.currentJob?.id}`, error);
|
||||||
const e = error as Error;
|
const e = error as Error;
|
||||||
if (this.currentJob) {
|
if (this.currentJob) {
|
||||||
await this.queue.fail(this.currentJob.id, e);
|
await this.queue.fail(this.currentJob.id, e);
|
||||||
|
Reference in New Issue
Block a user