File: uploadModifiedFile.puml

package info (click to toggle)
onedrive 2.5.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,252 kB
  • sloc: sh: 660; makefile: 167
file content (56 lines) | stat: -rw-r--r-- 1,459 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@startuml
start
partition "Upload Modified File" {
  :Initialize API Instance;
  :Check for Dry Run;
  if (Is Dry Run?) then (yes)
    :Create Fake Response;
  else (no)
    :Get Current Online Data;
    if (Error Fetching Data) then (yes)
      :Handle Errors;
      if (Retryable Error?) then (yes)
        :Retry Fetching Data;
        detach
      else (no)
        :Log and Display Error;
      endif
    endif
    if (filesize > 0 and valid latest online data) then (yes)
      if (is online file newer) then (yes)
        :Log that online is newer; 
        :Perform safe backup;
        note left: Local data loss prevention
        :Upload renamed local file as new file;
      endif
    endif
    :Determine Upload Method;
    if (Use Simple Upload?) then (yes)
      :Perform Simple Upload;
      if (Upload Error) then (yes)
        :Handle Upload Errors and Retries;
        if (Retryable Upload Error?) then (yes)
          :Retry Upload;
          detach
        else (no)
          :Log and Display Upload Error;
        endif
      endif
    else (no)
      :Create Upload Session;
      :Perform Upload via Session;
      if (Session Upload Error) then (yes)
        :Handle Session Upload Errors and Retries;
        if (Retryable Session Error?) then (yes)
          :Retry Session Upload;
          detach
        else (no)
          :Log and Display Session Error;
        endif
      endif
    endif
  endif
  :Finalize;
}
stop
@enduml