File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ func cmdRun(cliContext *cli.Context) error {
82
82
83
83
rootCtx , rootCancel := context .WithCancel (context .Background ())
84
84
defer rootCancel ()
85
+
85
86
start := time .Now ()
86
87
87
88
signals := make (chan os.Signal , 2048 )
@@ -103,11 +104,22 @@ func cmdRun(cliContext *cli.Context) error {
103
104
if err != nil {
104
105
return fmt .Errorf ("failed to get state file: %w" , err )
105
106
}
107
+
108
+ dbRW , err := sqlite .Open (stateFile )
109
+ if err != nil {
110
+ return fmt .Errorf ("failed to open state file: %w" , err )
111
+ }
112
+ defer dbRW .Close ()
113
+
106
114
dbRO , err := sqlite .Open (stateFile , sqlite .WithReadOnly (true ))
107
115
if err != nil {
108
116
return fmt .Errorf ("failed to open state file: %w" , err )
109
117
}
110
118
defer dbRO .Close ()
119
+
120
+ if err := gpudstate .CreateTableMachineMetadata (rootCtx , dbRW ); err != nil {
121
+ return fmt .Errorf ("failed to create table: %w" , err )
122
+ }
111
123
uid , err := gpudstate .ReadMachineID (rootCtx , dbRO )
112
124
if err != nil {
113
125
return fmt .Errorf ("failed to read machine ID: %w" , err )
You can’t perform that action at this time.
0 commit comments