jomo
83defa6885
make default parameter case insensitive, add missing docs to renders
...
See #142
2015-09-30 00:52:51 +02:00
jomo
ecfec6a407
use MHF_Steve and MHF_Alex instead of steve and alex in default parameter
...
See #142 (not fixed by this commit!)
Basically, this just adds mhf_steve and mhf_alex as special cases for the default parameter only
2015-09-30 00:38:32 +02:00
jomo
fd4fb0764c
return & use lwip-stripped image in skins.save_image
...
no need to pass along (possibly) bulky or broken images!
see #147
2015-09-29 23:32:16 +02:00
jomo
6fbfd6c355
update dependencies
2015-09-26 16:22:32 +02:00
jomo
c8d74d47be
avoid reserved property names (+ test), fixes #145
2015-09-25 19:24:56 +02:00
jomo
5e1e7f3701
update dependencies
2015-09-23 00:29:50 +02:00
jomo
5e7d116364
readme IRC badge improvement
...
the server is now in the badge label and the channel is shown on hover
2015-09-22 21:37:55 +02:00
jomo
1ecf3c0122
add 504 to expected return codes, don't cache unexpected responses
2015-09-21 22:21:14 +02:00
jomo
cc2840ae4b
log error if http code not available
2015-09-20 22:02:37 +02:00
jomo
d49f7279b3
log response ID first for access log
...
also made sure 'headers' is defined before it's used
2015-09-20 21:45:37 +02:00
jomo
a15cb20144
TooManyRequestsException shouldn't actually throw an error
...
all other errors thrown here are network issues, this is not.
2015-09-20 21:43:12 +02:00
jomo
06895cdd81
add TooManyRequestsException to silent_errors
2015-09-20 21:35:46 +02:00
jomo
9cdca6acda
don't throw strings
2015-09-20 21:28:43 +02:00
jomo
26f6b089ef
log errors only once, fixes #140
...
also made sure some (network) errors have level 'WARN'
these are printed without stacktrace
2015-09-20 21:17:13 +02:00
jomo
b97087c099
catch HTTP 500/503 and empty response, fixes #141
2015-09-20 20:58:34 +02:00
jomo
750d741308
log when cleaner has nothing to do
2015-09-17 01:51:11 +02:00
jomo
7e77142b29
add link to crafatar/setup
2015-09-15 04:38:24 +02:00
jomo
8ddc300a11
#138 bump http_timeout to 2 seconds
...
we run into the timeout quite frequently, even on a fast network.
2s should be long enough for mojang to reply
2015-09-06 03:40:17 +02:00
jomo
6a630f23b9
add new test CRCs for @6d12ed6
2015-09-06 00:47:17 +02:00
jomo
6d12ed685b
enhance renders by using binary transparency
...
this is a temporary fix for #32 .
it doesn't solve the problem, but it makes the renders much less worse.
in combination with #134 this will hopefully lead to fixing the problem entirely
2015-09-06 00:22:57 +02:00
jomo
fe12901f41
update app.json
...
Also fixed our description in package.json
2015-09-03 00:26:25 +02:00
jomo
47a978df6c
add image dir to git
2015-09-02 23:57:08 +02:00
jomo
90022d9e6c
revert 4d949362be
2015-09-02 23:50:20 +02:00
jomo
b4ae89832a
add missing 'cache' import in routes/skins
2015-09-02 23:22:52 +02:00
jomo
841eb39f05
remove obsolete imports
2015-08-31 05:41:18 +02:00
jomo
3a61e15abf
various networking.js improvements
...
- cleaned up some messy if/else code, replaced with nicely readable switch/case
- catch JSON.parse errors
2015-08-31 00:10:35 +02:00
jomo
ccc7314ea0
fix 'Permission denied' on travis
2015-08-30 23:19:45 +02:00
jomo
5f0e16897d
travis 💩 N°2
2015-08-30 22:24:35 +02:00
jomo
5aaf075f94
travis 💩
2015-08-30 22:21:01 +02:00
jomo
52098ca2f8
hotfix for #139
2015-08-30 22:12:43 +02:00
jomo
2e738f8b40
use crafatar/node-df
...
until adriano-di-giovanni/node-df#3 is merged
fixes #4
2015-08-30 05:42:28 +02:00
jomo
755cc74170
don't update file dates
...
this was originally implemented because we wanted to delete the oldest images on disk
where 'oldest' means not *used* for the longest time
that's not useful and was never actually implemented, so we don't need this
2015-08-30 04:48:50 +02:00
jomo
78f2f2027f
cleaner: be less verbose
2015-08-30 04:29:56 +02:00
jomo
5f703eda70
check disk/redis every 10 minutes
2015-08-30 03:58:57 +02:00
jomo
6746459c8d
delete cape images when cleaning
2015-08-30 03:57:29 +02:00
jomo
e56f300d3e
use EPHEMERAL_STORAGE instead of HEROKU env
...
afaik you can have persistent storage on heroku, at least via addons
and heroku is probably not the only environment where one has a temporary file system
2015-08-30 02:11:35 +02:00
jomo
ac9cd93c8e
512MB free disk space is better than 10MB
2015-08-29 22:42:02 +02:00
jomo
3156423209
fix typo
2015-08-22 18:30:29 +02:00
jomo
a928952dc4
don't force image directories to be relative
2015-08-20 01:52:01 +02:00
jomo
9ed431d7ad
remove images/ (see @4d94936)
2015-08-18 01:33:00 +02:00
jomo
4d949362be
change default config to use /var/lib/crafatr/images
...
I think this makes more sense, especially when you run multiple instances
so they can use the same image cache instead of each version relying on their own
2015-08-18 01:11:38 +02:00
jomo
b460260bae
remove logs/
...
should be up to the user where to put log files
and to make sure that directory actually exists
currently nothing in this code base expects
logs/ to be present.
2015-08-18 01:08:01 +02:00
jomo
0b58b3a4d1
add final log before shutting down on SIGTERM
2015-08-16 22:27:22 +02:00
jomo
85e7b4b571
remove clusters
...
clusters aren't supported, see #80
until we actually use clusters, having a main AND a single worker cluster just makes things more difficult
2015-08-16 22:18:17 +02:00
jomo
72708ca590
remove forever, update dependencies
...
forever should be used externally to start crafatar. it's not an internal dependency
2015-08-16 22:14:26 +02:00
jomo
79da225b9f
gracefully shut down on SIGTERM
...
this will close the server, i.e. all new connections will be dropped
while existing connections are able to complete within 30 seconds
otherwise they are dropped and the server force quits
2015-08-16 22:11:08 +02:00
jomo
49b4ae1a6e
exit on process error
...
From the iojs docs:
> An unhandled exception means your application - and by extension io.js itself -
> is in an undefined state. Blindly resuming means anything could happen.
>
> Think of resuming as pulling the power cord when you are upgrading your system.
> Nine out of ten times nothing happens - but the 10th time, your system is bust.
>
> uncaughtException should be used to perform synchronous cleanup before shutting
> down the process. It is not safe to resume normal operation after
> uncaughtException. If you do use it, restart your application after every
> unhandled exception!
2015-08-16 06:17:38 +02:00
jomo
d6a9f7c71a
add JS to check mojang's server status
...
does CORS request to status.mojang.com/check and figures out if 'uuid', 'name' or 'both' are affected
not doing anything yet
2015-07-28 23:58:48 +02:00
jomo
442dee0280
don't print all this shit when we receive a 500
2015-07-27 20:06:16 +02:00
jomo
3edf89e884
Merge branch 'master' of github.com:crafatar/crafatar
2015-07-22 23:24:30 +02:00
jomo
c2d2644bbe
make travis fast attempt 2
...
See @fc5ab113db93842cf27b5d94bd98c597a7d0f133 for attempt 1
2015-07-22 23:24:26 +02:00
jomo
256edd622f
https
2015-07-21 10:06:01 +02:00
jomo
fd647c5953
3D renders are still beta
...
@Jake0oo0 fyi
We haven't changed anything on our 3D renders since we first introduced them.
They still have rendering glitches, they still don't render the jacket layer,
they still don't support alex-type skins.
Telling people this is no longer beta (@2515575) doesn't seem like a good idea.
2015-07-20 22:28:06 +02:00
jomo
607dcaf6e5
use status -2 for 404s
...
human_status (response.js) defines code -2 as 'user error'. 404 is definitely a user error, so using that makes sense.
eventually we should change the whole status code thing with #120
2015-07-17 10:09:34 +02:00
jomo
fc5ab113db
Merge branch 'master' of github.com:crafatar/crafatar
2015-07-17 01:37:35 +02:00
jomo
d0689c9e3b
change two more logs to debug
2015-07-17 01:37:26 +02:00
jomo
5de8c77ffb
fix docker-options
2015-07-14 01:14:23 +02:00
jomo
53e571bd6e
renew dokku installation instructions
...
+ some minor readme changes
2015-07-14 00:45:58 +02:00
jomo
73af64ef2b
add IRC badge
2015-07-12 17:36:59 +02:00
jomo
44cff242d7
update dependencies
2015-06-29 15:42:45 +02:00
jomo
72840433cb
use proper URL encoding in tests
2015-06-25 21:55:23 +02:00
jomo
d56b10955e
add tests for uuid defaults, #115
2015-06-25 21:46:14 +02:00
jomo
8c022e5cb6
'useranme'
2015-06-25 21:34:15 +02:00
jomo
f9b7ffb5b7
fix redirection test
2015-06-25 21:33:47 +02:00
jomo
3e4f150262
add missing import N°2
2015-06-25 21:24:26 +02:00
jomo
fa8e719de3
add missing import
2015-06-25 21:22:54 +02:00
jomo
34f94bf9b5
get rid of redundant config names #124
2015-06-25 21:19:50 +02:00
jomo
20b6fd55aa
clean up config comments, fix postinstall. #124
2015-06-25 20:44:38 +02:00
jomo
2d71d2954e
clean up gitignore
2015-06-25 20:35:54 +02:00
jomo
f36cfa7898
skip helm for images without alpha channel
...
hotfix for #117
2015-05-28 01:55:05 +02:00
jomo
c54e3020e9
shut up travis
2015-05-28 01:35:39 +02:00
jomo
288657107e
actually store the skin in store_skin, fixes #108 ; pipe skins & capes through lwip before saving, fixes #121
2015-05-28 01:32:29 +02:00
jomo
679e72759a
fix test for TooManyRequests
2015-05-28 01:05:24 +02:00
jomo
0ec97e9ba1
add alternative checksum for mojang capes
2015-05-28 00:52:26 +02:00
jomo
11f580bb95
fix TooManyRequests test
2015-05-28 00:45:48 +02:00
jomo
01049cb34d
rewrite request queue, fixes #118
2015-05-28 00:45:20 +02:00
jomo
189698bed9
add alternative checksums for steve & alex
...
using the latest version of lwip, the images don't have an alpha channel anymore
apparently before @94322f3 npm thought 'crafatar/lwip' means git tag v0.0.5
and after that commit, using 'EyalAr/lwip' it noticed there's a v0.0.6
...
...
...
wat.
2015-05-27 23:28:54 +02:00
jomo
7f8da3abe2
lint tests
2015-05-27 22:35:59 +02:00
jomo
94322f3a77
update dependencies
...
also using ~ operator, i.e. allow patch-level changes
2015-05-27 19:02:09 +02:00
jomo
51b7d19cb0
add 'Contributions welcome' notice to readme
2015-05-27 01:04:36 +02:00
jomo
bb4de15ff2
no yoda
...
usually, '10 === finished' would be considered yoda
but in this case, with this naming of variables
it makes a lot more sense this way
2015-05-26 22:21:07 +02:00
jomo
c93ffa5a79
add test for simultaneous requests
2015-05-26 22:16:33 +02:00
jomo
5ef3c4f59c
add test for URL encoding
2015-05-26 21:53:33 +02:00
jomo
fd6fd0f1bd
fix bulk.sh script
2015-05-25 14:13:09 +02:00
jomo
add4d1abac
allow some latency
2015-05-24 17:22:47 +02:00
jomo
b7929d06d3
fix alt tag in readme
2015-05-24 17:02:27 +02:00
jomo
9c5e5ff9a7
shuffle ids for bulk.sh
...
this requires gshuf (coreutils) to be installed on OS X
2015-05-24 16:55:04 +02:00
jomo
9a8dcbdff1
Revert "add missing @ for twitter username"
...
This reverts commit 48ce2f9267 .
Actually looks better without the @. It has a leading Larry anyways
2015-05-24 15:53:11 +02:00
jomo
e1f1fe7c57
add toobusy 503 response
2015-05-24 13:34:49 +02:00
jomo
6f94af7a4a
log response time
2015-05-07 01:06:56 +02:00
jomo
fd18c70bec
catch uncaughtException
2015-05-06 23:24:21 +02:00
jomo
9c59d302c9
Merge branch 'http-response'
2015-05-06 22:36:22 +02:00
jomo
6273e3bcc8
adjust 422 messages
2015-05-06 22:13:28 +02:00
jomo
00f6c28cfc
add tests for 422 / invalid xy / user error
2015-05-06 22:11:19 +02:00
jomo
d27eb0049f
update to iojs 2.0
2015-05-06 22:00:54 +02:00
jomo
d1e174405a
fix wrong URL in test
2015-05-06 21:59:44 +02:00
jomo
15afa940f0
update lwip for iojs 2.0.0
2015-05-06 21:50:57 +02:00
jomo
46d10fdc81
remove unnecessary double check
2015-05-06 21:07:43 +02:00
jomo
ed25d30ff0
remove unnecessary log
2015-05-06 21:07:19 +02:00
jomo
9f04fbc136
allow multiple checksums for tests, fixes #119
...
As discussed in #119 , the rendered image can be slightly different in different environments
2015-05-06 21:06:09 +02:00