Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • D Dumux Web App
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 19
    • Issues 19
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and 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-repositoriesdumux-repositories
  • Dumux Web App
  • Merge requests
  • !35

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

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Timo Koch requested to merge fix/client-specific-simulations-runs into master Sep 05, 2020
  • Overview 0
  • Commits 1
  • Pipelines 0
  • 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
Reviewers
Request review from
Time tracking
Source branch: fix/client-specific-simulations-runs