@@ -148,16 +148,16 @@ func init() {
148148}
149149
150150// RunForever runs the worker, receiving jobs until terminated.
151- func RunForever (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile string , primaryRedis , readRedis * redis.Client , redisMaxSize int64 , cachePrefix , cacheParts []string , clean , preflightAction , secureStorage bool , maxCacheSize , minDiskSpace int64 , memoryThreshold float64 , connCheck string , connCheckPeriod time.Duration , versionFile string , costs map [string ]mettlecli.Currency , ackExtension time.Duration , immediateShutdown bool ) {
152- err := runForever (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile , primaryRedis , readRedis , redisMaxSize , cachePrefix , cacheParts , clean , preflightAction , secureStorage , maxCacheSize , minDiskSpace , memoryThreshold , connCheck , connCheckPeriod , versionFile , costs , ackExtension , immediateShutdown )
151+ func RunForever (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile string , primaryRedis , readRedis * redis.Client , largeBlobSize int64 , cachePrefix , cacheParts []string , clean , preflightAction , secureStorage bool , maxCacheSize , minDiskSpace int64 , memoryThreshold float64 , connCheck string , connCheckPeriod time.Duration , versionFile string , costs map [string ]mettlecli.Currency , ackExtension time.Duration , immediateShutdown bool ) {
152+ err := runForever (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile , primaryRedis , readRedis , largeBlobSize , cachePrefix , cacheParts , clean , preflightAction , secureStorage , maxCacheSize , minDiskSpace , memoryThreshold , connCheck , connCheckPeriod , versionFile , costs , ackExtension , immediateShutdown )
153153 log .Fatalf ("Failed to run: %s" , err )
154154}
155155
156156// RunOne runs one single request, returning any error received.
157- func RunOne (instanceName , name , storage , dir , cacheDir , sandbox , altSandbox , tokenFile string , primaryRedis , readRedis * redis.Client , redisMaxSize int64 , cachePrefix , cacheParts []string , clean , secureStorage bool , digest * pb.Digest ) error {
157+ func RunOne (instanceName , name , storage , dir , cacheDir , sandbox , altSandbox , tokenFile string , primaryRedis , readRedis * redis.Client , largeBlobSize int64 , cachePrefix , cacheParts []string , clean , secureStorage bool , digest * pb.Digest ) error {
158158 // Must create this to submit on first
159159 topic := common .MustOpenTopic ("mem://requests" )
160- w , err := initialiseWorker (instanceName , "mem://requests" , "mem://responses" , name , storage , dir , cacheDir , "" , sandbox , altSandbox , "" , "" , tokenFile , primaryRedis , readRedis , redisMaxSize , cachePrefix , cacheParts , clean , secureStorage , 0 , math .MaxInt64 , 100.0 , "" , nil , 0 )
160+ w , err := initialiseWorker (instanceName , "mem://requests" , "mem://responses" , name , storage , dir , cacheDir , "" , sandbox , altSandbox , "" , "" , tokenFile , primaryRedis , readRedis , largeBlobSize , cachePrefix , cacheParts , clean , secureStorage , 0 , math .MaxInt64 , 100.0 , "" , nil , 0 )
161161 if err != nil {
162162 return err
163163 }
@@ -184,8 +184,8 @@ func RunOne(instanceName, name, storage, dir, cacheDir, sandbox, altSandbox, tok
184184 return nil
185185}
186186
187- func runForever (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile string , primaryRedis , readRedis * redis.Client , redisMaxSize int64 , cachePrefix , cacheParts []string , clean , preflightAction , secureStorage bool , maxCacheSize , minDiskSpace int64 , memoryThreshold float64 , connCheck string , connCheckPeriod time.Duration , versionFile string , costs map [string ]mettlecli.Currency , ackExtension time.Duration , immediateShutdown bool ) error {
188- w , err := initialiseWorker (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile , primaryRedis , readRedis , redisMaxSize , cachePrefix , cacheParts , clean , secureStorage , maxCacheSize , minDiskSpace , memoryThreshold , versionFile , costs , ackExtension )
187+ func runForever (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile string , primaryRedis , readRedis * redis.Client , largeBlobSize int64 , cachePrefix , cacheParts []string , clean , preflightAction , secureStorage bool , maxCacheSize , minDiskSpace int64 , memoryThreshold float64 , connCheck string , connCheckPeriod time.Duration , versionFile string , costs map [string ]mettlecli.Currency , ackExtension time.Duration , immediateShutdown bool ) error {
188+ w , err := initialiseWorker (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile , primaryRedis , readRedis , largeBlobSize , cachePrefix , cacheParts , clean , secureStorage , maxCacheSize , minDiskSpace , memoryThreshold , versionFile , costs , ackExtension )
189189 if err != nil {
190190 return err
191191 }
@@ -255,7 +255,7 @@ func runForever(instanceName, requestQueue, responseQueue, name, storage, dir, c
255255 }
256256}
257257
258- func initialiseWorker (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile string , primaryRedis , readRedis * redis.Client , redisMaxSize int64 , cachePrefix , cacheParts []string , clean , secureStorage bool , maxCacheSize , minDiskSpace int64 , memoryThreshold float64 , versionFile string , costs map [string ]mettlecli.Currency , ackExtension time.Duration ) (* worker , error ) {
258+ func initialiseWorker (instanceName , requestQueue , responseQueue , name , storage , dir , cacheDir , browserURL , sandbox , altSandbox , lucidity , promGatewayURL , tokenFile string , primaryRedis , readRedis * redis.Client , largeBlobSize int64 , cachePrefix , cacheParts []string , clean , secureStorage bool , maxCacheSize , minDiskSpace int64 , memoryThreshold float64 , versionFile string , costs map [string ]mettlecli.Currency , ackExtension time.Duration ) (* worker , error ) {
259259 // Make sure we have a directory to run in
260260 if err := os .MkdirAll (dir , os .ModeDir | 0755 ); err != nil {
261261 return nil , fmt .Errorf ("Failed to create working directory: %s" , err )
@@ -332,7 +332,7 @@ func initialiseWorker(instanceName, requestQueue, responseQueue, name, storage,
332332 metricTicker : time .NewTicker (5 * time .Minute ),
333333 }
334334 if primaryRedis != nil {
335- w .client = newRedisClient (client , primaryRedis , readRedis , redisMaxSize )
335+ w .client = newRedisClient (client , primaryRedis , readRedis , largeBlobSize )
336336 }
337337 if ackExtension > 0 {
338338 if ! strings .HasPrefix (requestQueue , "gcppubsub://" ) {
0 commit comments