Skip to content

Commit

Permalink
Add pid to stream wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Oct 20, 2024
1 parent 0aac8b5 commit 73cb1cd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pokemonred_puffer/wrappers/stream_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import json
import os

import gymnasium as gym
import websockets
Expand All @@ -14,10 +15,7 @@ def __init__(self, env: RedGymEnv, config: DictConfig):

self.user = config.user
self.ws_address = "wss://transdimensional.xyz/broadcast"
self.stream_metadata = {
"user": self.user,
"env_id": self.env_id,
}
self.stream_metadata = {"user": self.user, "env_id": self.env_id, "extra": os.getpid()}
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(self.loop)
self.websocket = self.loop.run_until_complete(self.establish_wc_connection())
Expand Down

0 comments on commit 73cb1cd

Please sign in to comment.