File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
src/main/java/com/iexec/worker Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -89,15 +89,16 @@ public void run(String... args) {
8989 if (!publicConfiguration .getRequiredWorkerVersion ().isEmpty () &&
9090 !versionService .getVersion ().equals (publicConfiguration .getRequiredWorkerVersion ())) {
9191
92- String message = String .format ("Bad version! please upgrade your iexec-worker [current:%s, required:%s]" ,
92+ String badVersion = String .format ("Bad version! please upgrade your iexec-worker [current:%s, required:%s]" ,
9393 versionService .getVersion (), publicConfiguration .getRequiredWorkerVersion ());
9494
95- LoggingUtils .printHighlightedMessage (message );
95+ LoggingUtils .printHighlightedMessage (badVersion );
9696 System .exit (0 );
9797 }
9898
9999 if (!iexecHubService .hasEnoughGas ()) {
100- log .error ("No enough gas, please refill your wallet!" );
100+ String noEnoughGas = String .format ("No enough gas! please refill your wallet [walletAddress:%s]" , workerAddress );
101+ LoggingUtils .printHighlightedMessage (noEnoughGas );
101102 System .exit (0 );
102103 }
103104
Original file line number Diff line number Diff line change 1818import com .iexec .worker .feign .CustomFeignClient ;
1919import com .iexec .worker .result .ResultService ;
2020import com .iexec .worker .sms .SmsService ;
21+ import com .iexec .worker .utils .LoggingUtils ;
2122
2223import lombok .extern .slf4j .Slf4j ;
2324
@@ -216,6 +217,9 @@ public void contribute(ContributionAuthorization contribAuth) {
216217
217218 if (!contributionService .hasEnoughGas ()) {
218219 customFeignClient .updateReplicateStatus (chainTaskId , OUT_OF_GAS );
220+ String noEnoughGas = String .format ("Out of gas! please refill your wallet [walletAddress:%s]" ,
221+ contribAuth .getWorkerWallet ());
222+ LoggingUtils .printHighlightedMessage (noEnoughGas );
219223 System .exit (0 );
220224 }
221225
@@ -250,6 +254,10 @@ public void reveal(String chainTaskId) {
250254
251255 if (!revealService .hasEnoughGas ()) {
252256 customFeignClient .updateReplicateStatus (chainTaskId , OUT_OF_GAS );
257+ customFeignClient .updateReplicateStatus (chainTaskId , OUT_OF_GAS );
258+ String noEnoughGas = String .format ("Out of gas! please refill your wallet [walletAddress:%s]" ,
259+ workerConfigurationService .getWorkerWalletAddress ());
260+ LoggingUtils .printHighlightedMessage (noEnoughGas );
253261 System .exit (0 );
254262 }
255263
You can’t perform that action at this time.
0 commit comments