| | 980 | |
| | 981 | //Check 2-. Wait till any other jobs currently in the job queue for this |
| | 982 | // container are done. |
| | 983 | sprintf(gcQuery,"SELECT uJob FROM tJob" |
| | 984 | " WHERE uContainer=%u AND (uJobStatus=%u OR uJobStatus=%u)",uContainer,uWAITING,uRUNNING); |
| | 985 | mysql_query(&gMysql,gcQuery); |
| | 986 | if(mysql_errno(&gMysql)) |
| | 987 | { |
| | 988 | logfileLine("ChangeIPContainer",mysql_error(&gMysql)); |
| | 989 | exit(2); |
| | 990 | } |
| | 991 | res=mysql_store_result(&gMysql); |
| | 992 | if((field=mysql_fetch_row(res))) |
| | 993 | { |
| | 994 | logfileLine("ChangeIPContainer","Job returned to queue other jobs pending"); |
| | 995 | tJobWaitingUpdate(uJob); |
| | 996 | mysql_free_result(res); |
| | 997 | return; |
| | 998 | } |
| | 999 | mysql_free_result(res); |