This tag is for questions relating to event streams in HTTP. Event streams are an easy way for a server to have a continuous connection with the client and send data back and forth.
Questions tagged [event-stream]
137 questions
1
vote
1 answer
Gulp: How to create a stream from a promise of an array of streams?
I have a list of tasks that are initiated by an async function. I end up with a promise of an array of streams. I need to merge these streams into a single stream and return that to Gulp. The following is what I came up with. It's kind of clunky. Is…

cleong
- 7,242
- 4
- 31
- 40
1
vote
1 answer
gulp ruby sass and concat is putting my sourcemap inside css
I'm using event-stream so that I can compile SASS and merge it with CSS in one task. It's working great my only problem is the sourcemap is getting merged inside the CSS.
gulp code
gulp.task('css', function(){
var sassGlob =…

user391986
- 29,536
- 39
- 126
- 205
1
vote
2 answers
Node.js event-stream: Where to setMaxListeners?
I have searched and searched for this, to no avail. I've combed the web (including Stackoverflow), and the Node docs for an answer, and not found one---that worked (maybe that's just bad searching on my part). I'm working with an event-stream in a…

user2646829
- 28
- 4
1
vote
2 answers
Perl Mojolicious + PgAsync plugin -- Leaking database connections?
I am using Mojolicious with a plugin called pgAsync in order to listen for NOTIFY events that are being emitted from a Postgres database. The code I currently have is working fine, but I am seeing that the number of database connections is only…

Mike
- 4,071
- 21
- 36
1
vote
1 answer
Detect when user leaves an event stream
I'm trying to make a chatroom from scratch using Sinatra. I need to detect when a user leaves the page. At first, I was thinking about using a Javascript onbeforeunload function, but then users could actually fake leaving or leave without notifying…

Piccolo
- 1,612
- 4
- 22
- 38
1
vote
1 answer
how to pipe readable stream to a child_process.exec command using event-stream in node.js?
I have the following (non-functioning) code:
var es = require('event-stream');
var cp = require('child_process');
es.pipeline(
es.child(cp.exec("ls")),
es.split(/[\t\s]+/),
es.map(function(data,cb){
if ( /\.txt$/.test(data) )…

AndyPerlitch
- 4,539
- 5
- 28
- 43
1
vote
0 answers
Unable to access HTML5 Event-Stream (Node.js)
Ok, here goes. I made a simple chat server that uses Node.js and HTML5 Event-Streams, but for some reason, the Event-Stream won't work, the client-side page displays nothing in the textarea that should hold messages from the Event-Stream. I can't…

FatalKeystroke
- 2,882
- 7
- 23
- 35
0
votes
1 answer
Drools Fusion duration and timestamp, why it doesn't work?
I am new in Drools applications and above all in Drools fusion. In my office we are working on a Standalone Complex Event Processing application. One of main requirements is the possibility to calculate starting time, frequency, end time, duration…

Alberto Rugnone
- 1
- 1
- 2
0
votes
0 answers
Return Eventstream response from Azure openai to nextjs
In order to not expose the api key of my Azure openai ,I create a nextjs API that send the request to openai and get the stream and send it back to the Front End ,I created the
pages/api/gpt
Here is my code
import { OpenAIError} from…

Yafaa Ben Tili
- 176
- 1
- 7
0
votes
0 answers
SSE on GCP Cloud Run results in 503 error (works locally)
I have a Remix app setup with Firebase hosting and Cloud Run to host the back end. I am not too familiar with the stack but can give more information if needed. For the firebase hosting and authorisation I used this as a guide:…
0
votes
0 answers
Output python logging in realtime to front end
In python Flask app, I can declare a custom stream:
from Flask import Response
import logging
from datetime import datetime
from time import sleep
logger = logging.getLogger('my_log_stream')
handler = logging.StreamHandler()
handler.setFormatter =…

jHards
- 1
- 2
0
votes
0 answers
How to handle EventStream POST requests with the webRequest API for browser extensions?
I'm trying to handle EventStream POST requests using the webRequest API in a browser extension. I'm not able to correctly process the event-stream chunks sent by the server. My goal is to intercept the response chunks and store them in my script.…

Charles León
- 23
- 3
0
votes
1 answer
PHP Content-Type: text/event-stream with PHP FPM/CGI - ChatGPT text streaming
I'm working with the ChatGPT API in PHP.
I'm trying to stream the ChatGPT completion text in PHP. When I do it on my local machine it works fine, but my server is using PHP FPM and as a result, it isn't streaming text but is outputting all the text…

Jimmison Johnson
- 41
- 5
0
votes
0 answers
How can I receive server-sent events (SSE) or event-stream in AppGyver (low-code platform) and trigger a change in an app variable?
I am developing a mobile application using AppGyver, a low-code platform, and I need to receive server-sent events (SSE) or event-stream from a backend server and trigger a change in an app variable. The backend server sends continuous data updates…
0
votes
0 answers
Django_eventstream to send notifications from backend to frontend: the stream is established but it's empty
I'm trying to send notification from backend (Django) to frontend (Vue.js) using django_eventstream
Following the library quide, I create endpoint in asgi.py:
import django_eventstream
import os
from channels.auth import AuthMiddlewareStack
from…

OlegТ
- 173
- 9