Skip to content
Merged
Show file tree
Hide file tree
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
22 changes: 21 additions & 1 deletion generated/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -15108,7 +15108,7 @@ type events {
"""filter the rows returned"""
where: event_players_bool_exp
): event_players_aggregate!
starts_at: timestamptz
starts_at: timestamptz!

"""An array relationship"""
teams(
Expand Down Expand Up @@ -15822,6 +15822,10 @@ type game_server_nodes {
): jsonb
cpu_sockets: Int
cpu_threads_per_core: Int
cpu_warnings(
"""JSON select path"""
path: String
): jsonb
cs2_launch_options(
"""JSON select path"""
path: String
Expand Down Expand Up @@ -16001,6 +16005,7 @@ input game_server_nodes_aggregate_order_by {
input game_server_nodes_append_input {
cpu_frequency_info: jsonb
cpu_governor_info: jsonb
cpu_warnings: jsonb
cs2_launch_options: jsonb
cs2_video_settings: jsonb
gpu_info: jsonb
Expand Down Expand Up @@ -16074,6 +16079,7 @@ input game_server_nodes_bool_exp {
cpu_governor_info: jsonb_comparison_exp
cpu_sockets: Int_comparison_exp
cpu_threads_per_core: Int_comparison_exp
cpu_warnings: jsonb_comparison_exp
cs2_launch_options: jsonb_comparison_exp
cs2_video_settings: jsonb_comparison_exp
csgo_build_id: Int_comparison_exp
Expand Down Expand Up @@ -16134,6 +16140,7 @@ delete the field or element with specified path (for JSON arrays, negative integ
input game_server_nodes_delete_at_path_input {
cpu_frequency_info: [String!]
cpu_governor_info: [String!]
cpu_warnings: [String!]
cs2_launch_options: [String!]
cs2_video_settings: [String!]
gpu_info: [String!]
Expand All @@ -16146,6 +16153,7 @@ delete the array element with specified index (negative integers count from the
input game_server_nodes_delete_elem_input {
cpu_frequency_info: Int
cpu_governor_info: Int
cpu_warnings: Int
cs2_launch_options: Int
cs2_video_settings: Int
gpu_info: Int
Expand All @@ -16158,6 +16166,7 @@ delete key/value pair or string element. key/value pairs are matched based on th
input game_server_nodes_delete_key_input {
cpu_frequency_info: String
cpu_governor_info: String
cpu_warnings: String
cs2_launch_options: String
cs2_video_settings: String
gpu_info: String
Expand Down Expand Up @@ -16192,6 +16201,7 @@ input game_server_nodes_insert_input {
cpu_governor_info: jsonb
cpu_sockets: Int
cpu_threads_per_core: Int
cpu_warnings: jsonb
cs2_launch_options: jsonb
cs2_video_settings: jsonb
csgo_build_id: Int
Expand Down Expand Up @@ -16398,6 +16408,7 @@ input game_server_nodes_order_by {
cpu_governor_info: order_by
cpu_sockets: order_by
cpu_threads_per_core: order_by
cpu_warnings: order_by
cs2_launch_options: order_by
cs2_video_settings: order_by
csgo_build_id: order_by
Expand Down Expand Up @@ -16450,6 +16461,7 @@ input game_server_nodes_pk_columns_input {
input game_server_nodes_prepend_input {
cpu_frequency_info: jsonb
cpu_governor_info: jsonb
cpu_warnings: jsonb
cs2_launch_options: jsonb
cs2_video_settings: jsonb
gpu_info: jsonb
Expand Down Expand Up @@ -16478,6 +16490,9 @@ enum game_server_nodes_select_column {
"""column name"""
cpu_threads_per_core

"""column name"""
cpu_warnings

"""column name"""
cs2_launch_options

Expand Down Expand Up @@ -16649,6 +16664,7 @@ input game_server_nodes_set_input {
cpu_governor_info: jsonb
cpu_sockets: Int
cpu_threads_per_core: Int
cpu_warnings: jsonb
cs2_launch_options: jsonb
cs2_video_settings: jsonb
csgo_build_id: Int
Expand Down Expand Up @@ -16833,6 +16849,7 @@ input game_server_nodes_stream_cursor_value_input {
cpu_governor_info: jsonb
cpu_sockets: Int
cpu_threads_per_core: Int
cpu_warnings: jsonb
cs2_launch_options: jsonb
cs2_video_settings: jsonb
csgo_build_id: Int
Expand Down Expand Up @@ -16934,6 +16951,9 @@ enum game_server_nodes_update_column {
"""column name"""
cpu_threads_per_core

"""column name"""
cpu_warnings

"""column name"""
cs2_launch_options

Expand Down
32 changes: 19 additions & 13 deletions generated/schema.ts

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22512,6 +22512,14 @@ export default {
"cpu_threads_per_core": [
38
],
"cpu_warnings": [
1652,
{
"path": [
78
]
}
],
"cs2_launch_options": [
1652,
{
Expand Down Expand Up @@ -22868,6 +22876,9 @@ export default {
"cpu_governor_info": [
1652
],
"cpu_warnings": [
1652
],
"cs2_launch_options": [
1652
],
Expand Down Expand Up @@ -23014,6 +23025,9 @@ export default {
"cpu_threads_per_core": [
39
],
"cpu_warnings": [
1654
],
"cs2_launch_options": [
1654
],
Expand Down Expand Up @@ -23152,6 +23166,9 @@ export default {
"cpu_governor_info": [
78
],
"cpu_warnings": [
78
],
"cs2_launch_options": [
78
],
Expand All @@ -23175,6 +23192,9 @@ export default {
"cpu_governor_info": [
38
],
"cpu_warnings": [
38
],
"cs2_launch_options": [
38
],
Expand All @@ -23198,6 +23218,9 @@ export default {
"cpu_governor_info": [
78
],
"cpu_warnings": [
78
],
"cs2_launch_options": [
78
],
Expand Down Expand Up @@ -23274,6 +23297,9 @@ export default {
"cpu_threads_per_core": [
38
],
"cpu_warnings": [
1652
],
"cs2_launch_options": [
1652
],
Expand Down Expand Up @@ -23749,6 +23775,9 @@ export default {
"cpu_threads_per_core": [
2781
],
"cpu_warnings": [
2781
],
"cs2_launch_options": [
2781
],
Expand Down Expand Up @@ -23891,6 +23920,9 @@ export default {
"cpu_governor_info": [
1652
],
"cpu_warnings": [
1652
],
"cs2_launch_options": [
1652
],
Expand Down Expand Up @@ -23929,6 +23961,9 @@ export default {
"cpu_threads_per_core": [
38
],
"cpu_warnings": [
1652
],
"cs2_launch_options": [
1652
],
Expand Down Expand Up @@ -24329,6 +24364,9 @@ export default {
"cpu_threads_per_core": [
38
],
"cpu_warnings": [
1652
],
"cs2_launch_options": [
1652
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ select_permissions:
- cpu_governor_info
- cpu_sockets
- cpu_threads_per_core
- cpu_warnings
- cs2_video_settings
- csgo_build_id
- demo_network_limiter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE public.game_server_nodes
DROP COLUMN cpu_warnings;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE public.game_server_nodes
ADD COLUMN cpu_warnings jsonb;
2 changes: 2 additions & 0 deletions src/game-server-node/game-server-node.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export class GameServerNodeController {
cpus: Record<number, number>;
frequency: number;
};
cpuWarnings?: Array<string>;
podStats: Array<PodStats>;
labels: Record<string, string>;
}): Promise<void> {
Expand Down Expand Up @@ -145,6 +146,7 @@ export class GameServerNodeController {
gpu,
"Online",
rootDisk,
payload.cpuWarnings ?? [],
);

if (result?.transitionedFromOffline) {
Expand Down
6 changes: 5 additions & 1 deletion src/game-server-node/game-server-node.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ export class GameServerNodeService {
| undefined,
status: e_game_server_node_statuses_enum,
rootDisk?: NodeDisk,
cpuWarnings: Array<string> = [],
) {
const gpuDevicesAll = gpu?.devices ?? null;
const hasGpu = (gpu?.count ?? 0) > 0 || (gpuDevicesAll?.length ?? 0) > 0;
Expand Down Expand Up @@ -228,6 +229,7 @@ export class GameServerNodeService {
supports_cpu_pinning: true,
cpu_governor_info: true,
cpu_frequency_info: true,
cpu_warnings: true,
update_status: true,
},
});
Expand Down Expand Up @@ -293,7 +295,8 @@ export class GameServerNodeService {
cpuGovernorInfo,
) ||
game_server_nodes_by_pk.token ||
!isJsonEqual(game_server_nodes_by_pk.cpu_frequency_info, cpuFrequencyInfo)
!isJsonEqual(game_server_nodes_by_pk.cpu_frequency_info, cpuFrequencyInfo) ||
!isJsonEqual(game_server_nodes_by_pk.cpu_warnings, cpuWarnings)
) {
await this.hasura.mutation({
update_game_server_nodes_by_pk: {
Expand All @@ -320,6 +323,7 @@ export class GameServerNodeService {
cpu_threads_per_core: cpuInfo.threadsPerCore,
cpu_governor_info: cpuGovernorInfo,
cpu_frequency_info: cpuFrequencyInfo,
cpu_warnings: cpuWarnings,
disk_available_gb: rootDisk
? Number.isNaN(parseInt(rootDisk.available))
? null
Expand Down
Loading