<commit_before>#!/bin/bash

system_updates_dir=/opt/engines/system/updates/to_run/engines


update_ids=`ls /opt/engines/system/updates/to_run/engines |grep -v keep`

for update_id in $update_ids
 do

export update_id

if ! test -d  $system_updates_dir/$update_id
 then
   exit
  fi
 
 
 if test -f  $system_updates_dir/$update_id/services
  then
  	services=`cat  $system_updates_dir/$update_id/services`
  		for service in $services
  		 do
  		 	eservice stop $service >> $system_updates_dir/$update_id/update_log
  		 	eservice recreate $service  >>  $system_updates_dir/$update_id/update_log
  		 done
  fi
  

  if test -f  $system_updates_dir/$update_id/updater.sh
   then
 		 $system_updates_dir/$update_id/updater.sh >>  $system_updates_dir/$update_id/update_log
 		if test $? -ne 0
 		 then
 		 echo Problem with $update_id
 		 cat  $system_updates_dir/$update_id/update_log
 		 mv  $system_updates_dir/$update_id /opt/engines/system/updates/failed/engines
 		 exit
 		  
 		 fi
 fi
 if test -d $system_updates_dir/$update_id 
  then
  	mv  $system_updates_dir/$update_id /opt/engines/system/updates/has_run/engines
 fi
<commit_msg>manualy pull image<commit_after>#!/bin/bash

system_updates_dir=/opt/engines/system/updates/to_run/engines


update_ids=`ls /opt/engines/system/updates/to_run/engines |grep -v keep`

for update_id in $update_ids
 do

export update_id

if ! test -d  $system_updates_dir/$update_id
 then
   exit
  fi
 
 
 if test -f  $system_updates_dir/$update_id/services
  then
  	services=`cat  $system_updates_dir/$update_id/services`
  		for service in $services
  		 do
  		 	eservice stop $service >> $system_updates_dir/$update_id/update_log
  		 	image=`grep image /opt/engines/run/services/$service/running.yaml | cut -f2 -d" "`
  			docker pull $image
  		 	eservice recreate $service  >>  $system_updates_dir/$update_id/update_log
  		 done
  fi
  

  if test -f  $system_updates_dir/$update_id/updater.sh
   then
 		 $system_updates_dir/$update_id/updater.sh >>  $system_updates_dir/$update_id/update_log
 		if test $? -ne 0
 		 then
 		 echo Problem with $update_id
 		 cat  $system_updates_dir/$update_id/update_log
 		 mv  $system_updates_dir/$update_id /opt/engines/system/updates/failed/engines
 		 exit
 		  
 		 fi
 fi
 if test -d $system_updates_dir/$update_id 
  then
  	mv  $system_updates_dir/$update_id /opt/engines/system/updates/has_run/engines
 fi

{'fraction_non_alphanumeric': 0.09458333333333334, 'fraction_numerical': 0.00125, 'mean_word_length': 3.4794776119402986, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '726793', 'n_tokens_mistral': 988, 'n_tokens_neox': 917, 'n_words': 163}