taskjuggler-python icon indicating copy to clipboard operation
taskjuggler-python copied to clipboard

Deal with past appointments

Open grandrew opened this issue 8 years ago • 2 comments

TJ3 emits error and does not generate anything if there are past appointments set.

Proposed solution: ignore past appointments

grandrew avatar Oct 13 '17 11:10 grandrew

The error looks like this:

/tmp/tmpcjQwnG.tjp:77: Error: Date 2017-09-11-09:00-+0000 must be within the project time frame 2017-10-16-13:00-+0000  - 2035-01-01-00:00-+0000
    start 2017-09-11-09:00:00
Traceback (most recent call last):
  File "/usr/local/bin/tjp-client", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/taskjuggler_python/tjpy_client.py", line 83, in main
    JUGGLER.run()
  File "/usr/local/lib/python2.7/dist-packages/taskjuggler_python/juggler.py", line 818, in run
    self.read_ical_result(ical_report_path+".ics")
  File "/usr/local/lib/python2.7/dist-packages/taskjuggler_python/juggler.py", line 765, in read_ical_result
    cal = icalendar.Calendar.from_ical(file(icalfile).read())
IOError: [Errno 2] No such file or directory: '/tmp/tmpxiGbngTJP/calendar_out.ics'

Proposed solkutions:

  • call the corresponding object's .onerror() method - potentially propagating up
    • default action is to emit a log message
  • create the error object that has no rendering for the file but can be queried with .walk()

the upstream application then:

  • can catch the exception and detect the exact object that caused the error, then push the information to whatever interface it has
  • just have the action implemented in the corresponding object class - e.g. updating the airtable "ERROR" column

grandrew avatar Oct 16 '17 13:10 grandrew

TODO: implement self-healing ability: e.g. the onerror method must be able to handle the error if possible in a manner similar to how ZODB offloads race condition handing in optimistic lock

grandrew avatar Oct 16 '17 13:10 grandrew