first commit
This commit is contained in:
57
logic.txt
Normal file
57
logic.txt
Normal file
@@ -0,0 +1,57 @@
|
||||
main (status)
|
||||
try{
|
||||
query getListOutboxs (status)
|
||||
|
||||
if status == N
|
||||
foreach outboxs as outbox
|
||||
if outbox.fileUrl == null
|
||||
resUp = uploadFile()
|
||||
if resUp == OK
|
||||
sentMsg()
|
||||
else resUp eror
|
||||
changeStatus dari N ke E
|
||||
continue
|
||||
else
|
||||
sentMsg()
|
||||
|
||||
else if status == E
|
||||
foreach outboxs as outbox
|
||||
if outbox.retry >= 5
|
||||
continue
|
||||
else
|
||||
retry++
|
||||
if outbox.fileUrl == null
|
||||
resUp = uploadFile()
|
||||
if resUp == OK
|
||||
sentMsg()
|
||||
else resUp eror
|
||||
retry++
|
||||
changeStatus dari E ke R dan retry++
|
||||
else
|
||||
sentMsg()
|
||||
|
||||
else if status == R
|
||||
foreach outboxs as outbox
|
||||
if outbox.retry >= 5
|
||||
continue
|
||||
else
|
||||
retry++
|
||||
if outbox.fileUrl == null
|
||||
resUp = uploadFile()
|
||||
if resUp == OK
|
||||
sentMsg()
|
||||
else resUp eror
|
||||
retry++
|
||||
changeStatus dari E ke R dan retry++
|
||||
else
|
||||
sentMsg()
|
||||
|
||||
}
|
||||
|
||||
catch {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
*sentMsg tidak usah diberi eror handling, info aja karena responnya tidak berpengaruh ke fungsi lain
|
||||
Reference in New Issue
Block a user