HiveMinds / tw-install

Automatically installs Taskwarrior, Taskserver (TODO: and Timewarrior). This project aims to support automated installation of all Taskwarrior hook scripts, configuration flavours etc. with a single command.
GNU Affero General Public License v3.0
17 stars 7 forks source link

`FillBacklogTasks.manageBacklogFilling` writes to `backlog.data` which can cause conflict with taskwarrior commands. #19

Closed a-t-0 closed 3 years ago

a-t-0 commented 3 years ago
      <p>Between <code>lines = readLines(backlogPath, backlogFileName);</code> and method <code>CreateFiles.writeFileContent</code>, the user has the time to enter taskwarrior commands that should imply changes in file <code>backlog.data</code>.</p>

However currently the changes made in that timeframe are lost, since after the delay between reading the backlog.data file and writing the modifications to it, the modifications are written to backlog.data, even though the modifcations did not yet take those user commands into account.

Two solutions could be:

If there does, just repeat step 2. until the user did not enter any taskwarrior commands that modify the backlog.data file in between modification processing time.

Todo: Find out what happends if the user command changing backlog.data and sorting read backlog.data action are extremely close together, e.g. that the user changes are still being written while the custom sorting read backlog.data action is being sent already. (And vice versa). To determine if there can occur any loss in user modifications in the very slim chance of simultaneous occurrence.