Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/posit/connect/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import posixpath
import secrets
import time
from posixpath import dirname
from typing import List, Optional, overload

Expand Down Expand Up @@ -213,9 +213,9 @@ def restart(self) -> None:
self.update()

if self.is_interactive:
random_hash = secrets.token_hex(32)
key = f"_CONNECT_RESTART_TMP_{random_hash}"
self.environment_variables.create(key, random_hash)
unix_epoch_in_seconds = str(int(time.time()))
key = f"_CONNECT_RESTART_TMP_{unix_epoch_in_seconds}"
self.environment_variables.create(key, unix_epoch_in_seconds)
self.environment_variables.delete(key)
# GET via the base Connect URL to force create a new worker thread.
url = posixpath.join(dirname(self.url), f"content/{self.guid}")
Expand Down