Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D Dumux Web App
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • dumux-repositories
  • Dumux Web App
  • Merge requests
  • !35

[backend][bugfix] Only communicate with client that requested simulation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Timo Koch requested to merge fix/client-specific-simulations-runs into master Sep 05, 2020
  • Overview 0
  • Commits 1
  • Changes 3

There is two versions of emit: (1) a context-aware version imported from flask_socketio (2) a context-ignorant version socketio.emit

The (1) version automatically only communicates with the client that send the request. The (2) version is used in context-ignorant setting, e.g. a long-running background task like the Docker result streamer. However, the default will emit the message to all connected clients. So all clients get results from all currently running simulations.

With this fix, we now pass the client/socket id to the stream which then only emits the result messages in the private "room" of the client that requested the simulation. In all other occassions in the backend, we use the context-aware version of emit now. Tested in local setup with two tabs in the same browser. Before this commit I would get messages from both running simulations. After this commit I only get the results of the simulation I started from that respective tab.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix/client-specific-simulations-runs