runtraj.execution.schedule.add_due_releases#

runtraj.execution.schedule.add_due_releases(location, directory, *, now, delay=8)[source]#

Add the releases now due to a project’s releases.csv, and return the ids of all that are due.

The due hours are those of due_hours(), from the newest hour releases.csv holds; each site of sites.csv gets a release at each. Releases the file already holds are kept as they are, and their ids are returned too: a tick runs those that did not finish before.

Parameters:
  • location (str) – Where the project’s inputs are: the URL they were copied to, or the project folder itself. releases.csv is locked there while it is read, added to, and written back.

  • directory (str | Path) – The project folder on this machine: location itself, or the copy of its inputs.

  • now (datetime) – The time to act as if it were, in UTC (check_now()).

  • delay (int) – Hours before an hour is added (DELAY_HOURS).

Raises:
  • FileNotFoundError – If the project has no sites.csv.

  • ValueError – If sites.csv or releases.csv cannot be read.

  • OSError – If releases.csv cannot be locked, or copied from or back to location.

Return type:

list[str]