[Fix] Internal cron scheduler blocking view responses

Internal cron is now triggered by an axios request from the frontend so it can truly run in a separate request. Fixes #167
This commit is contained in:
2025-12-07 12:55:33 +01:00
parent 25034ee2f3
commit 6b688f72e0
8 changed files with 108 additions and 119 deletions
+24
View File
@@ -2,11 +2,35 @@
// import AuthLayout from '@/layouts/auth/AuthSimpleLayout.vue';
// import AuthLayout from '@/layouts/auth/AuthCardLayout.vue';
import AuthLayout from '@/layouts/auth/AuthSplitLayout.vue';
import { onMounted } from 'vue';
import { usePage } from '@inertiajs/vue3'
import axios from 'axios';
defineProps<{
title?: string;
description?: string;
}>();
const cron = usePage().props.cron
onMounted(() => {
if (navigator.platform.toUpperCase().indexOf('MAC') >= 0) {
document.body.classList.add('is-mac')
}
if (cron) {
triggerWebcron()
}
})
const triggerWebcron = async function () {
await axios.get('/webcron')
.catch(function (response) {
if (response.status >= 400) {
console.error(response)
}
})
}
</script>
<template>