diff --git a/pkg/options/resource-provider.go b/pkg/options/resource-provider.go index 09016682..4cc21843 100644 --- a/pkg/options/resource-provider.go +++ b/pkg/options/resource-provider.go @@ -22,7 +22,7 @@ func NewResourceProviderOptions() resourceprovider.ResourceProviderOptions { func GetDefaultResourceProviderPowOptions() resourceprovider.ResourceProviderPowOptions { return resourceprovider.ResourceProviderPowOptions{ - EnablePow: GetDefaultServeOptionBool("ENABLE_POW", false), + DisablePow: GetDefaultServeOptionBool("DISABLE_POW", false), NumWorkers: GetDefaultServeOptionInt("NUM_WORKER", 0), CudaGridSize: GetDefaultServeOptionInt("CUDA_GRID_SIZE", 256), @@ -85,12 +85,12 @@ func AddResourceProviderOfferCliFlags(cmd *cobra.Command, offerOptions *resource func AddResourceProviderPowCliFlags(cmd *cobra.Command, options *resourceprovider.ResourceProviderPowOptions) { cmd.PersistentFlags().BoolVar( - &options.EnablePow, "enable-pow", options.EnablePow, - `Start pow mining (ENABLE_POW)`, + &options.DisablePow, "disable-pow", options.DisablePow, + `Disable pow mining (DISABLE_POW)`, ) cmd.PersistentFlags().IntVar( &options.NumWorkers, "num-worker", options.NumWorkers, - `Start pow mining (NUM_WORKER)`, + `Pow worker number (NUM_WORKER)`, ) cmd.PersistentFlags().IntVar( diff --git a/pkg/resourceprovider/resourceprovider.go b/pkg/resourceprovider/resourceprovider.go index 4250ff7f..65e5201e 100644 --- a/pkg/resourceprovider/resourceprovider.go +++ b/pkg/resourceprovider/resourceprovider.go @@ -53,7 +53,7 @@ type ResourceProviderOfferOptions struct { // this configures the pow we will keep track of type ResourceProviderPowOptions struct { - EnablePow bool + DisablePow bool NumWorkers int CudaGridSize int @@ -91,7 +91,7 @@ func NewResourceProvider( } func (resourceProvider *ResourceProvider) Start(ctx context.Context, cm *system.CleanupManager) chan error { - if resourceProvider.options.Pow.EnablePow { + if !resourceProvider.options.Pow.DisablePow { go resourceProvider.StartMineLoop(ctx) } return resourceProvider.controller.Start(ctx, cm)