File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55import posixpath
6- import secrets
6+ import time
77from posixpath import dirname
88from typing import List , Optional , overload
99
@@ -213,9 +213,9 @@ def restart(self) -> None:
213213 self .update ()
214214
215215 if self .is_interactive :
216- random_hash = secrets . token_hex ( 32 )
217- key = f"_CONNECT_RESTART_TMP_{ random_hash } "
218- self .environment_variables .create (key , random_hash )
216+ unix_epoch_in_seconds = str ( int ( time . time ()) )
217+ key = f"_CONNECT_RESTART_TMP_{ unix_epoch_in_seconds } "
218+ self .environment_variables .create (key , unix_epoch_in_seconds )
219219 self .environment_variables .delete (key )
220220 # GET via the base Connect URL to force create a new worker thread.
221221 url = posixpath .join (dirname (self .url ), f"content/{ self .guid } " )
You can’t perform that action at this time.
0 commit comments