Closed aclark4life closed 9 years ago
Index/query requirement 1
A range for unknown number of indexes is not possible in the catalog. i have to re-imagine the problem a bit differently. This requirement is probably meant for the notifications daemon which will have daily or nightly triggers.
daily query:
now = datetime.now()
catalog({
"portal_type": "uu.task",
"task_state": ["created", "discarded", "inprogress"],
"task_notifications_day": int(time.mkdtime(datetime(
now.year, now.month, now.day
))),
})
hourly query:
now = datetime.now()
catalog({
"portal_type": "uu.task",
"task_state": ["created", "discarded", "inprogress"],
"task_notifications_hour": int(time.mkdtime(datetime(
now.year, now.month, now.day, now.hour
))),
})
index/query requirement 2
"overdue tasks" method queries all tasks not marked as complete, with due date before (datetime1)
now = datetime.now()
catalog({
"portal_type": "uu.task",
"task_state": ["created", "discarded", "inprogress"],
"task_due": {"query": DateTime(), "range": "min"},
})
index requirement 3
now = datetime.now()
catalog({
"portal_type": "uu.task",
"task_state": ["created", "discarded", "inprogress"],
"task_assignee": ["userid1"],
})
index requirement 4
now = datetime.now()
catalog({
"portal_type": "uu.task",
"task_state": ["created", "discarded", "inprogress"],
"task_project_manager": ["userid1"],
})
Nice, thanks
These four query scenarios, AFAICT, take care of 90% or more of use cases for special views or portlets we may create in future, and most of the requirements of notification daemon (other than the storage of whether a notification is sent)