Closed Bug 1048353 Opened 10 years ago Closed 10 years ago

One time tasks need expiration date

Categories

(Mozilla QA Graveyard :: One and Done, defect, P1)

Version 2
x86
macOS
defect

Tracking

(Not tracked)

VERIFIED FIXED
Milestone 2

People

(Reporter: rbillings, Unassigned)

Details

Attachments

(1 file)

One time tasks should expire in one month if they are not completed. This was originally part of bug 1005100, but was never implemented.

- tasks need a claimed expiration date where they are returned to the dashboard, and user claim is removed if the task is not completed in one month
Just looking for clarification here: You are not talking about an expiration date that is set when creating the task - you are talking about an automatically calculated expiration date for the task attempt, that will change its status from "Started" to "Abandoned" if not completed within 30 days. Is that correct?
Flags: needinfo?(rbillings)
That is correct
Flags: needinfo?(rbillings)
We are actually going to have a new task attempt status called "Closed" which will be used for automatically closing attempts when a Task expires or becomes invalid. It sounds like we should use that for this case as well, as opposed to "Abandoned". This would also allow us to notify a user if their current attempt were transitioned to this state, as per bug 1030996.

Please confirm that we should change the status to "Closed".
Flags: needinfo?(rbillings)
Closed is not appropriate in this situation. The idea is to return the task to the pool for other people to grab- so it would go back to available. Instead of changing the status, it's more about removing the hold that the user has on the task.
Flags: needinfo?(rbillings)
I think you may misunderstand. Closed is the status of the Attempt, not the Task. Changing the attempt's status to Closed _would_ return the task to the pool. It just seems to me that *we* are closing the user's attempt, because they took too long. *They* are not abandoning it. Although you could argue they have already abandoned it by not completing it within 30 days.

I am fine with either Abandoned or Closed, but I wanted to make sure I accurately explained the difference. Either status will give us the result we want - it's just a question of how we want the attempt marked. Should it be marked as closed (which means by us), or as abandoned?
Flags: needinfo?(rbillings)
You're right- I misunderstood. Yes, closed should be the status of the attempt- it's better than abandoned for the reasons you listed.
Flags: needinfo?(rbillings)
Comment on attachment 8470061 [details] [review]
Link to Github pull-request: https://github.com/mozilla/oneanddone/pull/167

r+, feedback on Github
Attachment #8470061 - Flags: review?(mkelly) → review+
I have completed the background task that will check for attempts that:

- have a status of Open
- are for one-time tasks
- have been open for over 30 days

for any that it finds, it will change the status to Closed.

The number 30 is a setting, so it can be changed easily in the future.

This code can be deployed, but it will not do anything until it is either run manually (which we can do for testing purposes) or via a cron job which I will not be setting up yet. We need to have the notifications in place before we can start automatically closing tasks, so that will block scheduling the cron job.

I'm going to make this as fixed, but it won't be sufficiently verifiable until we have the notifications piece in place.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
I'd appreciate knowing how to run it manually - or at least setting it up on staging with a really short duration, now that notifications have been implemented.
This was verified
Status: RESOLVED → VERIFIED
Product: Mozilla QA → Mozilla QA Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: