Commit Graph

1812 Commits

Author SHA1 Message Date
Tyler Renelle e24d7476e8 refactor(errors): remove more res.json(500) in favor of next(err) 2014-02-07 09:20:40 -07:00
Tyler Renelle e36d3264be chore(cluster): temporarily disable cluster (revert here) 2014-02-06 20:12:52 -07:00
Tyler Renelle f7ded9d690 chore(logging): remove console.log(isStaticPage) 2014-02-06 13:28:19 -07:00
Tyler Renelle 2837edd51f chore(cluster): use domain-middleware properly, so domains are used to restart cluster workers 2014-02-06 10:58:47 -07:00
Matteo Pagliazzi 90e9a1aeaa i18n(refactor): load all files in a locale, not the ones defined in app.json, move env.t client code to own file, add env.isStaticPage (from isFrontPage) 2014-02-06 17:17:21 +01:00
Tyler Renelle e268839bcb chore(throttling): lower api limit a tad, just to test 2014-02-05 21:33:24 -07:00
Tyler Renelle 0c21f54c67 fix(user): make sure next is passed to all routes, and is available in
err-back of batch updates
2014-02-05 21:28:46 -07:00
Tyler Renelle 4c3c4b2ae7 perf(user): save user.save till very end of ops queue 2014-02-05 21:22:25 -07:00
Tyler Renelle bf5e9016a4 fix(errors): return next(err) when experiencing errors, instead of res.json(500,{err:err}). Let the top-level error handler handle this (needed for upcoming versionerror discarding) 2014-02-05 17:28:59 -07:00
Tyler Renelle 9b3814575e perf(hall): use $gt in contributors.level index instead of $ne:null for
better performance
2014-02-04 09:49:49 -07:00
Tyler Renelle 2786b36206 fix(mongoose): typo 2014-02-03 18:14:17 -07:00
Tyler Renelle 6a86da316b chore(mongoose): set some options per #2725 to address high number of open connections, replset connection timeout, and close mongoose connection on process death 2014-02-03 17:57:38 -07:00
Cole Gleason e3b5a3978a chore(logging): change disconnect message level from error to info 2014-02-03 01:25:54 -06:00
Tyler Renelle ac5ef440fe chore(merge): Merge remote-tracking branch 'colegleason/disconnect' into develop
Conflicts:
	src/utils.js
2014-02-02 23:42:59 -07:00
Tyler Renelle 83b3739f46 fix(winston): typo 2014-02-02 23:26:57 -07:00
Cole Gleason e966cc956a chore(logging): only log to console and file on dev (cc @lefnire) 2014-02-03 00:14:31 -06:00
Tyler Renelle dfa27b3fa2 Merge pull request #2685 from colegleason/logging
chore(logging): add Winston and replace console.log
2014-02-02 22:06:35 -08:00
Cole Gleason 85eb0aa38a chore(cluster): disconnect worker on error, then kill after 30 sec
(cc @lefnire): This disconnects the process, sets up a kill timer, and
then sends error emails and responses back to the client. This should
stop new clients from connecting to the dead worker, allow connections
already established to finish, and cause the master to fork a new worker
to pick up the slack immediately.
2014-02-03 00:00:58 -06:00
Cole Gleason b01d08ccfe Merge pull request #2693 from colegleason/csv
Set filename when exporting challenge to CSV
2014-02-01 17:10:09 -08:00
Tyler Renelle 78315d828b feat(quests): add flags.levelDrops for dropping items at certain levels 2014-02-01 16:15:20 -08:00
Cole Gleason 36f21196f4 fix(challenges): challenge csv export now has proper filename
This sets the Content-disposition filename for the Challenge CSV export
to be {challenge_id}.csv.

Fixes #2689.
2014-02-01 12:14:24 -06:00
Cole Gleason 71f4371d9c chore(logging): add Newrelic and Email transports for Winston
This will send an email on errors logged with winston and thus removes
the old error emailing code.
2014-02-01 02:46:22 -06:00
Cole Gleason ae847facda chore(logging): fix logging.error and make sure logger exists 2014-02-01 02:08:32 -06:00
Cole Gleason 4494600d92 chore(logging): replace console.* with new logging module 2014-02-01 02:01:19 -06:00
Cole Gleason 2188b5a6c0 chore(logging): add logging via Winston and wrapped it with a custom logging module 2014-02-01 01:47:11 -06:00
Tyler Renelle 54064debf3 feat(quests): allow dropping scrolls in quests 2014-01-31 15:06:56 -07:00
Tyler Renelle 800231cf64 feat(quests): allow html in quest notes 2014-01-31 15:06:56 -07:00
Tyler Renelle 179316e10f feat(restore): add restore-gp back in. Parly to end the winter event,
partly due to the convo at #2681 regarding subscriptions. Fixes #2681
2014-01-31 12:54:37 -07:00
Tyler Renelle a72b013131 fix(hall): let's try $gt instead of $ne:null, the query is still
slow
2014-01-31 11:11:42 -07:00
Tyler Renelle 87d196b038 chore(throttling): throttle in dev too 2014-01-31 11:11:16 -07:00
Tyler Renelle 1faec250d8 chore(throttling): throttle all requests, not just API requests. Since
we're 120req/min, this shouldn't pose an issue for normal usage. #2645
2014-01-31 10:47:41 -07:00
Tyler Renelle 92563915ef chore(throttling): add api-throttling (request limiting) so users can
only request routes 120times per minute (aka, 2req/second but spread out
for sanity). fixes #2645
2014-01-31 10:32:33 -07:00
Tyler Renelle ab86ba11bd fix(user): if need to upgrade site, send 501, not 400 2014-01-31 10:27:02 -07:00
Tyler Renelle afee0968f8 fix(groups): pass missing next into Like function 2014-01-30 23:31:58 -07:00
Tyler Renelle b42dacf203 fix(errors): handle if err.message == undefined, send err 2014-01-30 22:13:51 -07:00
Tyler Renelle a960c63f00 refactor(groups): small groups-creation cleanup 2014-01-30 21:54:24 -07:00
Tyler Renelle 0aec4caa78 fix(user): PUT user retricted path errors are 401, not 500 2014-01-30 21:39:19 -07:00
Tyler Renelle 8e86fddc64 Revert "chore(cluster): don't kill process until email sent"
This reverts commit 52df534196.
2014-01-30 21:34:14 -07:00
Tyler Renelle f967962996 fix(batch-update): send errors to client if batch-update found an error,
crash pid.
2014-01-30 21:33:28 -07:00
Tyler Renelle 5b6c4427b5 fix(groups): send error if +1 errored 2014-01-30 21:11:11 -07:00
Tyler Renelle aff885c05c feat(habitBirthday): add habitrpg birthday event. includes cakes for all
pets, absurd party robes, npc swap, badge, etc. @lemoness
2014-01-30 19:20:07 -07:00
Tyler Renelle 8a42e0c392 chore(logging): no production logging (how did this commit get removed?) 2014-01-30 17:21:17 -07:00
Tyler Renelle 52df534196 chore(cluster): don't kill process until email sent 2014-01-30 17:18:48 -07:00
Tyler Renelle 4f02ccb3b0 chore(cluster): kill & respawn pids on cluster fail, using domain-middleware 2014-01-30 17:01:13 -07:00
Tyler Renelle 7c3d85dbbe chore(cluster): try cluster again 2014-01-30 17:00:56 -07:00
Tyler Renelle 6f2f3dd71e chore(newrelic): some newrelic code location experiments 2014-01-30 13:43:30 -07:00
Tyler Renelle 85e2ce5c4a chore(logging): don't log in production 2014-01-30 11:04:43 -07:00
Tyler Renelle 5b06392879 chore(newrelic): add newrelic 2014-01-30 11:04:39 -07:00
Tyler Renelle 3660f1a85c feat(premium): backport server code for premium subs (it's just ccard
handling & uer model stuff)
2014-01-30 10:51:32 -07:00
Tyler Renelle 53917bc9f0 chore(cluster): remove all cluster code, just in case
`require('cluster')` is flagging issues, even if not in use. Revert this
in the near future when we can peg VersionError. @colegleason
2014-01-30 10:19:04 -07:00