Skip to content

Commit 479d47e

Browse files
committed
Fair queue processing
1 parent dffb7c3 commit 479d47e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/v_update_sys_queue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ source $V_FUNC/shared.func
1818

1919
# Defining pipe functions
2020
restart_pipe() {
21-
for service in $(cat $V_QUEUE/restart.pipe |sort |uniq); do
21+
for service in $(cat $V_QUEUE/restart.pipe |awk '!x[$0]++'); do
2222
$V_BIN/v_restart_$service
2323
done
2424
echo > $V_QUEUE/restart.pipe
@@ -37,7 +37,7 @@ traff_pipe() {
3737
}
3838

3939
backup_pipe() {
40-
for user in $(cat $V_QUEUE/backup.pipe |sort |uniq ); do
40+
for user in $(cat $V_QUEUE/backup.pipe |awk '!x[$0]++' ); do
4141
sed -i "/^$user$/d" $V_QUEUE/backup.pipe
4242
bash $V_BIN/v_backup_user $user
4343
# Send notification to user

0 commit comments

Comments
 (0)