Skip to content

Tasks Collection [ON HOLD] #5963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 45 commits into from
Closed

Tasks Collection [ON HOLD] #5963

wants to merge 45 commits into from

Conversation

paglias
Copy link
Contributor

@paglias paglias commented Sep 22, 2015

Work in progress.

API v1

  • deprecated

Mongoose 4 Mandatory

  • upgrade version in package.json
  • driver v2.x 1. If you are connecting to a replica set, you must specify the replicaSet option in the connection string. add ?replicaSet=name to production connection uri, can be found in admin panel under "To connect..."
  • driver v2.x 2. update returns a result object from the MongoDB server, rather than just the number affected. The second parameter to the callback will now look like { ok: 1, n: 3 } rather than simply the number affected.
  • autoinc not compatible

Tasks Collection

  • startDate default should be a function? 3e701e1#diff-a4823628c26fce6f17432a7c8d667e2bR54
  • use model on browser or check shared's tasksDefaults Not for now
  • User's history array going to keep it
  • Tags in their own collection? Not for now
  • Inbox in its own collection? Not for now
  • In migration remove the necessity of post('save') checks, especially for users data
  • shared.uuid use node-uuid
  • except for user's ops, use express 4 syntax for responses
  • use discriminators instead of having a single model fro habits/rewards/todos/dailys added support for discriminator mapping (closes #1003) Automattic/mongoose#1647
  • use cron to fix possible errors in user.tasksOrder
  • add indexes in foreground
  • prevent challenge task to have userId and make task.challenge not editable
  • migrate challenges.csv method
  • migrate challenges.getMember

Node v4

  • Upgrade to Node 4
  • Enable New Relic
  • newrelic add on for heroku
  • newrelic subscription
  • Upgrade deps

Migration

  • lower case only emails (code)
  • lower case only emails (migration)
  • fix task difficulty values (code)
  • fix task difficulty value (migration)
  • indexes

NPM 3

MongoDB 3

Misc

  • internal card and preparations for api v3

@paglias paglias added this to the Refactors and future tasks milestone Sep 25, 2015
@paglias paglias force-pushed the paglias/tasks-collection branch 7 times, most recently from 621c4ff to f958a6d Compare September 30, 2015 13:27
@paglias paglias force-pushed the paglias/tasks-collection branch 3 times, most recently from 24f4bfe to c6b0b86 Compare October 7, 2015 17:20
@crookedneighbor crookedneighbor modified the milestones: API V3, Refactors and future tasks Oct 8, 2015
@paglias paglias force-pushed the paglias/tasks-collection branch 2 times, most recently from 2bf7fd0 to 07f3d7e Compare October 11, 2015 16:16
@paglias paglias force-pushed the paglias/tasks-collection branch 3 times, most recently from 4432d98 to fe0b0ff Compare October 19, 2015 16:41
@crookedneighbor crookedneighbor modified the milestones: After API Test Migration, API V3 Oct 20, 2015
cron = (usr, missedDays=1) ->
usr.lastCron = moment().subtract(missedDays,'days')
usr.fns.cron()
daysMissed = usr.fns.shouldCronRun()
if daysMissed isnt 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the problem. You've changed daysMissed to return true or false.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll investigate some more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the good news is that it is working as intended, so it must be something wrong with how the test is written. I'm guessing that since the object is no longer a part of the user, the mock daily object isn't actually being updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@crookedneighbor shouldCronRun initially returned true or false but then I moved it to return numbers so it shouldn't be the problem. The problem is either with js inheritance or in cron itself but since I didn't change anything in cron the second option seems a bit strange

@paglias paglias force-pushed the paglias/tasks-collection branch 3 times, most recently from 10674cb to 2838bb2 Compare October 24, 2015 17:13
@@ -1,173 +1,13 @@
var express = require('express');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need this anymore? Is api v1 supported at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was deprecated but working, we can keep the message for 1-2 weeks and then remove it

@paglias paglias force-pushed the paglias/tasks-collection branch from c7da40d to 686f239 Compare October 27, 2015 21:20
cleanup package.json

put errorHandler middleware as the last one

use accepts module instead of req.acceptedLanguages

use normal object notation as it is supported is es5

remove deprecations from auth controller

remove deprecations from groups controller

Revert "remove deprecations from groups controller"

This reverts commit 7cf3629.

Revert "remove deprecations from auth controller"

This reverts commit deecd70.

request limit upped to 1mb and 10k chars for query parameters

Upgrade to Express 4.x
@paglias paglias force-pushed the paglias/tasks-collection branch from 686f239 to 5bab1c8 Compare October 28, 2015 09:31
@paglias paglias changed the title Tasks Collection Tasks Collection [ON HOLD] Oct 29, 2015
@paglias paglias removed this from the After API Test Migration milestone May 9, 2016
@paglias paglias closed this May 9, 2016
@paglias paglias deleted the paglias/tasks-collection branch September 17, 2016 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants