fixed a bug related with start time
This commit is contained in:
@@ -88,6 +88,7 @@ const start = async () => {
|
|||||||
initDatabase("local_library");
|
initDatabase("local_library");
|
||||||
init();
|
init();
|
||||||
|
|
||||||
|
|
||||||
const refreshAll = async () => {
|
const refreshAll = async () => {
|
||||||
await refreshTrendingAnime();
|
await refreshTrendingAnime();
|
||||||
await sleep(300);
|
await sleep(300);
|
||||||
@@ -109,9 +110,11 @@ const start = async () => {
|
|||||||
|
|
||||||
await loadExtensions();
|
await loadExtensions();
|
||||||
await initHeadless();
|
await initHeadless();
|
||||||
await refreshAll();
|
|
||||||
|
|
||||||
await fastify.listen({ port: 54322, host: "0.0.0.0" });
|
await fastify.listen({ port: 54322, host: "0.0.0.0" });
|
||||||
|
refreshAll().catch(e =>
|
||||||
|
console.error("initial refresh failed", e)
|
||||||
|
);
|
||||||
console.log(`Server running at http://localhost:54322`);
|
console.log(`Server running at http://localhost:54322`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
fastify.log.error(err);
|
fastify.log.error(err);
|
||||||
|
|||||||
@@ -101,9 +101,11 @@ const start = async () => {
|
|||||||
|
|
||||||
await loadExtensions();
|
await loadExtensions();
|
||||||
await initHeadless();
|
await initHeadless();
|
||||||
await refreshAll();
|
|
||||||
|
|
||||||
await fastify.listen({ port: 54322, host: "0.0.0.0" });
|
await fastify.listen({ port: 54322, host: "0.0.0.0" });
|
||||||
|
refreshAll().catch(e =>
|
||||||
|
console.error("initial refresh failed", e)
|
||||||
|
);
|
||||||
console.log(`Server running at http://localhost:54322`);
|
console.log(`Server running at http://localhost:54322`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
fastify.log.error(err);
|
fastify.log.error(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user