Commit graph

35 commits

Author SHA1 Message Date
Juan Tejada 0c900b072d Add new relic to all pkgs + Revert to PromiseUtils methods
- PromiseUtils does not conflict with newrelics changes to Promise
- Other misc fixes
2016-07-13 19:08:24 -07:00
Juan Tejada 5c1704ac8e Fix thenReturn + misc logger fixes 2016-07-13 17:41:07 -07:00
Ben Gotow b43b623ca6 Expand promise utils 2016-07-13 17:22:02 -07:00
Juan Tejada ab9c01a249 Remove bluebird
- Implement `each` and `promisifyAll` + other bluebird fns
2016-07-13 16:35:22 -07:00
Ben Gotow ffc2593c4e Log all box attributes to help track down bug 2016-07-13 11:42:34 -07:00
Ben Gotow 7056a4b8f4 Fix bug with accounts that have uidmin=0, not 1 2016-07-13 11:30:22 -07:00
Ben Gotow ae082c5b53 Fix support for Gmail accts with non-english folders 2016-07-12 16:12:04 -07:00
Ben Gotow ac627f1580 Remove use of Rx.toPromise(), which wasn't behaving as expected 2016-07-12 01:33:56 -07:00
Halla Moore 0860f3027c Fix two small errors 2016-07-11 14:23:46 -07:00
Juan Tejada dce872fac8 Adds bunyan for json logging on every package!
- Bunyan logs json output, and added a stream to send our logs to
cloudwatch
- Replaces /all/ instances of console.log. Turned eslint rule back on,
so we don't use console.log ever again.
- Added npm scripts to view pretty logs
2016-07-08 17:30:24 -07:00
Juan Tejada 8b1f012a3c Fix error serialization
- Remove cumbersome NylasError
- Add helper to serialize error when saving to account
2016-07-01 15:49:47 -07:00
Ben Gotow 8453985b1f Change worker removal so it waits for sync to complete 2016-07-01 15:41:22 -07:00
Juan Tejada 05091a4447 Update thrown errors to use serializable NylasError 2016-07-01 10:24:39 -07:00
Ben Gotow 3c2b8bcb15 Fix account creation redis publish, rename to make more clear 2016-06-30 13:25:13 -07:00
Ben Gotow 4d4a4cec32 Fix backwards logic preventing thread creation! 2016-06-30 11:04:51 -07:00
Ben Gotow b033b94091 Break Category into Folder, Label, populate Gmail lables for messages 2016-06-30 09:29:21 -07:00
Jackie Luo b3b5a5106c Add endpoint for file downloads 2016-06-29 19:14:04 -07:00
Evan Morikawa 4d7f728a75 categoryUID -> categoryImapUID and messageId -> messageHeaderId 2016-06-29 17:10:34 -07:00
Ben Gotow 6ecacdd591 Add account_id to all responses, downcase model ref columns 2016-06-29 10:36:35 -07:00
Ben Gotow 0189e3e77d Break Gmail mailboxes into folders and labels 2016-06-28 18:31:40 -07:00
Ben Gotow 1d1186cb34 Add more attributes to /threads, move processor to it's own process 2016-06-28 18:10:52 -07:00
Ben Gotow a10543c1c8 Chunk sync of large mailboxes, keep track of synced UID range, not just uidnext 2016-06-28 15:30:56 -07:00
Ben Gotow 8108a875ee Allow trailing slashes on API endpoints 2016-06-28 13:57:07 -07:00
Jackie Luo eaf19cc522 Add files endpoint for metadata 2016-06-28 13:55:00 -07:00
Jackie Luo a00f86660c Create file objects from MIME parts 2016-06-28 11:32:18 -07:00
Ben Gotow f68948c23f Fix population of db fields in processor 2016-06-27 16:38:40 -07:00
Ben Gotow 91887a6e11 Speed up sync by fetching preferred body block only 2016-06-27 16:11:36 -07:00
Juan Tejada ed749e0f51 Add sync worker error handling
- Handles sync errors in a single place. For now, if error is not a
socket error, will treat as a permanent error, save the error to the
account object, and prevent any other syncing until the error is cleared
from the account object
- Adds a NylasError class that can be extended and serialized. Adds it
to global namespace on all packages and replaces all uses of regular
Error
2016-06-27 16:03:38 -07:00
Juan Tejada 1fe7fdf4b1 More sync error handling WIP 2016-06-27 10:27:38 -07:00
Juan Tejada 63b929e59b Fix missing promise based error handling in sync-worker 2016-06-26 09:52:03 -07:00
Juan Tejada dd350a5081 Update IMAPConnection api + error handling fixes + misc
- `IMAPConnection::openBox` now returns a Promise that resolves to an
IMAPBox, and IMAPBox contains all of the `fetch` operations. This makes
the dependency between fetch operations and the currently open mailbox
explicit rather than implicit and by forcing the operations to be called on
a box instance and hopefully prevent errors. It will also throw an error
if the constraint is no longer satisfied.

- `fetch` operations now return an observable stream of messages (or Promise for single value),
while preserving the same logic of the original implementation. You can use `.toPromise()` on
the observable to get a Promise that resolves when the observable stream has
completely drained.

- Fixes error handling in a few places and renames some variables
2016-06-26 01:57:33 -07:00
Evan Morikawa 6ad9cdd322 Fixing broken processors 2016-06-23 14:15:30 -06:00
Evan Morikawa 1460a0ae9f Rename Refresh to Sync 2016-06-23 13:16:15 -06:00
Ben Gotow f5f435236f /auth + remove hardcoded stub in favor of curl request 2016-06-22 17:19:48 -07:00
Evan Morikawa 18f2925b43 Convert to monorepo 2016-06-22 14:41:32 -07:00