cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rob_callicotte
Community Contributor

state.json

Jump to solution

What does this file do and how can I manipulate it with impunity? Smiley Happy

The reason I'm asking about this is I noticed if I delete the dataFiles directory, after having processed the Canvas Data, the CanvasDataCli command does not recognize the fact I need the data redownloaded. It looks at this state file for the information. Which number should I have in the state.json file to enable a full download again?

1 Solution

Accepted Solutions
ccoan
Instructure
Instructure

Hello Robert,

The state.json file is the current state of downloaded files for the CLI. Since the CLI doesn't want to parse through all the files it's downloaded to see where it is (reason it says the sequence). It counts where it is in the sequence (why it doesn't redownload everything even when you delete the directory). The best bet is just to remove the file altogether if you want to reset your downloads. However you can also use it to go back to specific download points (say you lost the harddrive for your latest 10 files), you can reset the state.json back by 10, and once again redownload them.

View solution in original post

2 Replies
ccoan
Instructure
Instructure

Hello Robert,

The state.json file is the current state of downloaded files for the CLI. Since the CLI doesn't want to parse through all the files it's downloaded to see where it is (reason it says the sequence). It counts where it is in the sequence (why it doesn't redownload everything even when you delete the directory). The best bet is just to remove the file altogether if you want to reset your downloads. However you can also use it to go back to specific download points (say you lost the harddrive for your latest 10 files), you can reset the state.json back by 10, and once again redownload them.

rob_callicotte
Community Contributor

Thanks Eric! I figured out if I put it on 1, it started over. :smileysilly: However, your explanation helps me to see how this is designed as well as the safety in overriding the values in it. Great!