Comments (3)
We should probably cancel timers on --hot
reload.
from bun.
For anyone using --hot as of today, you can use a simple looping alternative:
console.log(`Program started`, Date.now())
intervalFunction();
function intervalFunction()
{
console.log("Hello World !");
await new Promise(resolve => setTimeout(resolve, 1000))
return await intervalFunction();
}
from bun.
Update, it appears that the issue occurs on setInterval.
/*
[DEBUG] Loading new schedule : _schedules/paidProductsDisabler with interval of 1000
[DEBUG] Controller Executed at 1708544326475
[2] Billing status: 1 | Days Left: 17.86 | Failed Days Left: null
[4] Billing status: 3 | Days Left: 17.87 | Failed Days Left: null
[DEBUG] Controller Executed at 1708544326479
[2] Billing status: 1 | Days Left: 17.86 | Failed Days Left: null
[4] Billing status: 3 | Days Left: 17.87 | Failed Days Left: null
[DEBUG] Controller Executed at 1708544326482
[2] Billing status: 1 | Days Left: 17.86 | Failed Days Left: null
[4] Billing status: 3 | Days Left: 17.87 | Failed Days Left: null
[DEBUG] Controller Executed at 1708544326485
[2] Billing status: 1 | Days Left: 17.86 | Failed Days Left: null
[4] Billing status: 3 | Days Left: 17.87 | Failed Days Left: null
One is supposed to arrive
*/
console.log(`Entering loading Schedules [Total: ${this.#schedules.length} schedules]`);
for (let schedule of this.#schedules)
{
console.log(`[DEBUG] Loading new schedule : ${schedule.controller} with interval of ${schedule.interval}`);
setTimeout(() => {
let res = new ResponseBuilder(this.#directory, "");
return res.loadController(schedule.controller, {
models: this.#models
}, res)
}, schedule.interval);
}
from bun.
Related Issues (20)
- ShellJS support broken starting with version 1.0.22
- Bun.serve error callback is missing the request HOT 1
- process.env being replaced by the string value of the variables during `bun build` HOT 1
- packages with names over 1024 crash the resolver HOT 4
- Ignore %c format specifier in the console and support
- Bun install fails to find dependency version for range specification HOT 1
- EBADF: Bad file descriptor. errno: -9 HOT 4
- bun build --watch to pick up new files defined as entry points HOT 1
- Segmentation fault (the memory image has been reset to disk) or Illegal instruction HOT 1
- Abort controller not working when using an http proxy
- SIGABRT with `bun --watch` and `chokidar.watch`
- dev server crashes after first refresh of the page - SIGSEGV (Address boundary error) HOT 1
- Bun build overriding node_modules packages
- Wildly bad networking performance with fetch in bun vs nodejs when switching between similar endpoints HOT 3
- Ts code not working after bun build HOT 1
- error: script "dev" was terminated by signal SIGABRT HOT 2
- [shell]: some characters (apparently latin-1) get modified when not starting the string parameter
- [stdio] Bun hangs reading from stdin pipeline at >= 16384 Bytes (16KiB) HOT 4
- Bun keeps installing and updating packages at the latest version and ignores the version specified in package.json HOT 2
- Bun build --compile output in wrong path
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bun.