Remove broker session rest
Reverts062ec07and5eb0ea7: every firm's broker session stays logged in around the clock again, renewing its token on the fixed timer as before. The tree is back to 6dd2528's. A session_rest row left in settings is unused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
062ec07f0a
commit
5ec5abde6e
+1
-21
@@ -45,7 +45,6 @@ interface AppSettings {
|
||||
instance_name: string | null;
|
||||
instance_id: string | null;
|
||||
trading_hours: string | null;
|
||||
session_rest: string | null;
|
||||
master_backup_token: string | null;
|
||||
proxy_url: string | null;
|
||||
user_agent: string | null;
|
||||
@@ -65,7 +64,6 @@ export default function SettingsPage() {
|
||||
const [contracts, setContracts] = useState<Record<string, ResolvedContract | null>>({});
|
||||
const [maxConcurrent, setMaxConcurrent] = useState<string>('5');
|
||||
const [tradingHours, setTradingHours] = useState<string>('full_cme');
|
||||
const [sessionRest, setSessionRest] = useState<boolean>(true);
|
||||
const [masterUrl, setMasterUrl] = useState<string>('');
|
||||
const [catalog, setCatalog] = useState<{
|
||||
version: number;
|
||||
@@ -116,7 +114,6 @@ export default function SettingsPage() {
|
||||
if (s.max_concurrent_accounts != null) {
|
||||
setMaxConcurrent(s.max_concurrent_accounts);
|
||||
}
|
||||
setSessionRest(s.session_rest !== '0');
|
||||
if (s.trading_hours != null) {
|
||||
setTradingHours(s.trading_hours);
|
||||
}
|
||||
@@ -164,7 +161,7 @@ export default function SettingsPage() {
|
||||
await fetch('/api/settings', {
|
||||
method: 'PATCH',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ max_concurrent_accounts: maxConcurrent, trading_hours: tradingHours, session_rest: sessionRest ? '1' : '0', master_dashboard_url: masterUrl, instance_name: instanceName, master_backup_token: backupToken, proxy_url: proxyUrl }),
|
||||
body: JSON.stringify({ max_concurrent_accounts: maxConcurrent, trading_hours: tradingHours, master_dashboard_url: masterUrl, instance_name: instanceName, master_backup_token: backupToken, proxy_url: proxyUrl }),
|
||||
});
|
||||
setSaving(false);
|
||||
setSaved(true);
|
||||
@@ -283,23 +280,6 @@ export default function SettingsPage() {
|
||||
<option value="equity_hours">Equity Hours (8:30 AM – 3:00 PM CT)</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="flex items-center justify-between gap-4 border-t border-slate-100 px-4 py-3">
|
||||
<div>
|
||||
<p className="text-sm font-medium text-slate-800">Rest idle broker sessions</p>
|
||||
<p className="text-xs text-slate-400 mt-0.5">
|
||||
Log a firm out once nothing is open and nothing is left to trade before its next
|
||||
session (weekends, the daily break, a finished day), and back in 20–50 min before
|
||||
that session opens, with a check-in every few daytime hours. Off keeps every
|
||||
session logged in around the clock.
|
||||
</p>
|
||||
</div>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={sessionRest}
|
||||
onChange={(e) => setSessionRest(e.target.checked)}
|
||||
className="h-4 w-4 shrink-0 accent-blue-500"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* ── Master Dashboard ── */}
|
||||
|
||||
Reference in New Issue
Block a user